Date: Thu, 2 Dec 2004 14:11:38 GMT From: Sergey Skvortsov <skv@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/74616: Update port: www/oops Message-ID: <200412021411.iB2EBcdB073465@freefall.freebsd.org> Resent-Message-ID: <200412021420.iB2EKLMT073725@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 74616 >Category: ports >Synopsis: Update port: www/oops >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Dec 02 14:20:21 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Sergey Skvortsov >Release: FreeBSD 4.10-STABLE i386 >Organization: >Environment: >Description: Update port: www/oops * add rc.subr usage * add pkg-message * minor cleanup >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/www/oops/Makefile,v retrieving revision 1.33 diff -u -r1.33 Makefile --- Makefile 15 Oct 2004 12:13:38 -0000 1.33 +++ Makefile 2 Dec 2004 13:59:25 -0000 @@ -7,7 +7,7 @@ PORTNAME= oops PORTVERSION= ${OOPSVERSION} -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= www MASTER_SITES= http://oops-cache.org/ DISTNAME= ${PORTNAME}-${OOPSVERSION} @@ -39,6 +39,9 @@ TOUCH="${TOUCH}" \ MKDIR="${MKDIR}" +USE_RC_SUBR= YES +PKGMESSAGE= ${WRKDIR}/pkg-message + pre-fetch: @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.oops @@ -49,6 +52,12 @@ pre-configure: @cd ${WRKSRC} && ${AUTOHEADER} +post-build: + @${SED} -e 's=%%PREFIX%%=${PREFIX}=g' \ + ${.CURDIR}/pkg-message > ${PKGMESSAGE} + @${SED} -e 's=%%RC_SUBR%%=${RC_SUBR}=g;s=%%PREFIX%%=${PREFIX}=g' \ + ${FILESDIR}/${PORTNAME}.sh > ${WRKDIR}/${PORTNAME}.sh + pre-install: @PKG_PREFIX=${PREFIX} BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL @@ -56,20 +65,13 @@ post-install: .if !defined(NOPORTDOCS) - @${INSTALL_MAN} ${WRKSRC}/doc/oops.8 ${PREFIX}/man/man8 - @${INSTALL_MAN} ${WRKSRC}/doc/oopsctl.8 ${PREFIX}/man/man8 + @${INSTALL_MAN} ${WRKSRC}/doc/oops*.8 ${PREFIX}/man/man8 .endif @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Sample of configuration file placed at ${PREFIX}/etc/oops !" - @ ${ECHO} "Copy oops.cfg.sample to oops.cfg, then run server..." - @ ${ECHO} "------------------------------------------------------------" - @${MKDIR} ${OOPSVAR} - @${CHMOD} 750 ${OOPSVAR} + @${MKDIR} -m 750 ${OOPSVAR} @${CHOWN} oops ${OOPSVAR} - - ${ECHO} "Installing ${PREFIX}/etc/rc.d/oops.sh.sample startup file." - ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/oops.sh ${PREFIX}/etc/rc.d/oops.sh.sample + @${INSTALL_SCRIPT} ${WRKDIR}/oops.sh ${PREFIX}/etc/rc.d/ + @${CAT} ${PKGMESSAGE} post-clean: @${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc Index: pkg-message =================================================================== RCS file: pkg-message diff -N pkg-message --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg-message 2 Dec 2004 13:41:24 -0000 @@ -0,0 +1,7 @@ +===> CONFIGURATION NOTE: + To setup oops, you may have to copy %%PREFIX%%/etc/oops/oops.cfg.sample + to %%PREFIX%%/etc/oops/oops.conf for editing. + +===> BE CAREFULL HOW TO BOOT on 1.5.23_4 or after: + To run oops server from startup, add oops_enable="YES" + in your /etc/rc.conf. Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/www/oops/pkg-plist,v retrieving revision 1.7 diff -u -r1.7 pkg-plist --- pkg-plist 20 Nov 2003 10:35:27 -0000 1.7 +++ pkg-plist 2 Dec 2004 14:00:48 -0000 @@ -10,7 +10,7 @@ etc/oops/tables/koi-alt.tab etc/oops/tables/koi-iso.tab etc/oops/tables/koi-win.tab -etc/rc.d/oops.sh.sample +etc/rc.d/oops.sh libexec/oops/accel.so libexec/oops/berkeley_db_api.so libexec/oops/custom_log.so @@ -33,7 +33,7 @@ sbin/oops @dirrm libexec/oops @dirrm etc/oops/tables -@dirrm etc/oops +@unexec rmdir %D/etc/oops 2>/dev/null || true @unexec rmdir %D/oops/DB 2>/dev/null || true @unexec rmdir %D/oops/logs 2>/dev/null || true @unexec rmdir %D/oops/storages 2>/dev/null || true Index: files/oops.sh =================================================================== RCS file: /home/ncvs/ports/www/oops/files/oops.sh,v retrieving revision 1.2 diff -u -r1.2 oops.sh --- files/oops.sh 14 Feb 2002 14:04:58 -0000 1.2 +++ files/oops.sh 2 Dec 2004 13:34:43 -0000 @@ -1,24 +1,48 @@ #!/bin/sh +# +# $FreeBSD$ +# -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then - echo "$0: Cannot determine the PREFIX" >&2 - exit 1 -fi - -case "$1" in -start) - if [ -x ${PREFIX}/sbin/oopsctl ]; then - ${PREFIX}/sbin/oopsctl $1 2>&1 > /dev/null; echo -n ' oops' - fi - ;; -stop) - if [ -x ${PREFIX}/sbin/oopsctl ]; then - ${PREFIX}/sbin/oopsctl $1 - fi - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - ;; -esac +# PROVIDE: oops +# REQUIRE: DAEMON +# KEYWORD: FreeBSD -exit 0 +. "%%RC_SUBR%%" + +name="oops" +rcvar=`set_rcvar` + +command="%%PREFIX%%/sbin/oopsctl" +procname="%%PREFIX%%/sbin/oops" +pidfile="/var/run/oops/oops.pid" + +required_files="%%PREFIX%%/etc/oops/oops.cfg" +required_dirs="/var/run/oops" + +extra_commands="reconfig rotate" + +start_cmd="start_cmd" +stop_cmd="stop_cmd" +reconfig_cmd="reconfig_cmd" +rotate_cmd="rotate_cmd" + +start_cmd() { + ${command} start 2>&1 > /dev/null +} + +stop_cmd() { + ${command} stop +} + +reconfig_cmd() { + ${command} reconfigure +} + +rotate_cmd() { + ${command} rotate +} + +load_rc_config "oops" +: ${oops_enable="NO"} + +run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412021411.iB2EBcdB073465>