Date: Tue, 29 Aug 2000 02:34:24 +0400 (MSD) From: ozz@FreeBSD.org.ru To: FreeBSD-gnats-submit@freebsd.org Subject: ports/20907: new port: www/oops Message-ID: <200008282234.e7SMYOI20159@ozz.freebsd.org.ru>
next in thread | raw e-mail | index | archive | help
>Number: 20907 >Category: ports >Synopsis: new port: www/oops >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Aug 28 15:40:05 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Sergey Osokin >Release: FreeBSD 5.0-CURRENT i386 >Organization: Russian FreeBSD Team >Environment: FreeBSD 5.0-CURRENT #0: Sat Aug 19 21:51:50 MSD 2000 >Description: new port: www/oops >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # oops # oops/Makefile # oops/files # oops/files/md5 # oops/files/oops.sh # oops/pkg # oops/pkg/DESCR # oops/pkg/PLIST # oops/pkg/COMMENT # oops/pkg/INSTALL # oops/patches # oops/patches/patch-aa # oops/patches/patch-ab # oops/patches/patch-ac # echo c - oops mkdir -p oops > /dev/null 2>&1 echo x - oops/Makefile sed 's/^X//' >oops/Makefile << 'END-of-oops/Makefile' X# New ports collection makefile for: oops X# Date created: 29 August 2000 X# Whom: Sergey Osokin aka oZZ <ozz@FreeBSD.org.ru> X# X# $FreeBSD: Exp $ X# X XPORTNAME= oops XPORTVERSION= 1.4.6 XCATEGORIES= www XMASTER_SITES= http://zipper.paco.net/~igor/oops/ X XMAINTAINER= ozz@FreeBSD.org.ru X XLIB_DEPENDS= db2.0:${PORTSDIR}/databases/db X XGNU_CONFIGURE= yes XCONFIGURE_ARGS= -enable-oops-user=oops XCONFIGURE_TARGET= $(ARCH)-unknown-freebsd$(OSREL) X Xpost-patch: X @cd ${WRKSRC}/src; \ X ${MV} oops.c oops.c.temp; \ X ${SED} -e s^%%PREFIX%%^${PREFIX}^g < oops.c.temp > oops.c; X Xpre-install: X @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL X X.include <bsd.port.pre.mk> X Xpost-install: X @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL X @ ${ECHO} "------------------------------------------------------------" X @ ${ECHO} "Sample of configuration file placed at ${PREFIX}/etc/oops !" X @ ${ECHO} "Copy oops.cfg.sample to oops.cfg, then run server..." X @ ${ECHO} "------------------------------------------------------------" X X @if [ ! -f ${PREFIX}/etc/rc.d/oops.sh ]; then \ X ${ECHO} "Installing ${PREFIX}/etc/rc.d/oops.sh startup file."; \ X ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/oops.sh ${PREFIX}/etc/rc.d/oops.sh; \ X fi X X.include <bsd.port.post.mk> END-of-oops/Makefile echo c - oops/files mkdir -p oops/files > /dev/null 2>&1 echo x - oops/files/md5 sed 's/^X//' >oops/files/md5 << 'END-of-oops/files/md5' XMD5 (oops-1.4.6.tar.gz) = ab0c051db38afd2a91b4380b31529064 END-of-oops/files/md5 echo x - oops/files/oops.sh sed 's/^X//' >oops/files/oops.sh << 'END-of-oops/files/oops.sh' X#!/bin/sh X Xif ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then X echo "$0: Cannot determine the PREFIX" >&2 X exit 1 Xfi X Xcase "$1" in Xstart) X [ -x ${PREFIX}/sbin/oops ] && (/usr/bin/su -f -m oops -c 'nohup /usr/local/sbin/oops' &) && echo -n 'oops' X ;; Xstop) X ;; X*) X echo "Usage: `basename $0` {start|stop}" >&2 Xesac X Xexit 0 END-of-oops/files/oops.sh echo c - oops/pkg mkdir -p oops/pkg > /dev/null 2>&1 echo x - oops/pkg/DESCR sed 's/^X//' >oops/pkg/DESCR << 'END-of-oops/pkg/DESCR' XOops! proxy server. XMain features of proxy server... X1. The program is ready to serve the requests immediately after it has got started. X2. The elementary file system is chosen as a model for storing the objects cashed. X3. Objects in the storage are indexed. Index is b-tree database, which allows finding the Xobjects with minimum time losses. X4. All operations on supporting storages (cleaning, expire), requiring blocking of access, are Xmade in the background with less priority. X5. The program is written with the help of multithread technology. X6. All the necessary operations are carried out within one program, no external demons X(ftpget, dnsservers, unlinkd). X XWWW: http://zipper.paco.net/~igor/oops/ END-of-oops/pkg/DESCR echo x - oops/pkg/PLIST sed 's/^X//' >oops/pkg/PLIST << 'END-of-oops/pkg/PLIST' Xsbin/oops Xetc/oops/oops.cfg.sample Xetc/oops/err_template.html.sample Xetc/oops/auth_template.html.sample Xetc/oops/passwd.sample Xetc/oops/redir_rules.sample Xetc/oops/redir_template.html.sample Xetc/oops/accel_maps.sample Xetc/oops/acl_local_networks.sample Xetc/oops/oopsctl Xetc/oops/modules/accel.so Xetc/oops/modules/err.so Xetc/oops/modules/lang.so Xetc/oops/modules/oopsctl_mod.so Xetc/oops/modules/redir.so Xetc/oops/modules/vary_header.so Xetc/oops/modules/custom_log.so Xetc/oops/modules/fastredir.so Xetc/oops/modules/log_dummy.so Xetc/oops/modules/passwd_file.so Xetc/oops/modules/transparent.so Xetc/oops/tables/koi-alt.tab Xetc/oops/tables/koi-iso.tab Xetc/oops/tables/koi-win.tab Xetc/rc.d/oops.sh X@dirrm oops/logs X@dirrm oops/DB X@dirrm oops/storages X@dirrm etc/oops/tables X@dirrm etc/oops/modules X@dirrm etc/oops X@dirrm oops END-of-oops/pkg/PLIST echo x - oops/pkg/COMMENT sed 's/^X//' >oops/pkg/COMMENT << 'END-of-oops/pkg/COMMENT' XOops! proxy server END-of-oops/pkg/COMMENT echo x - oops/pkg/INSTALL sed 's/^X//' >oops/pkg/INSTALL << 'END-of-oops/pkg/INSTALL' X#!/bin/sh X Xuser=oops X#group=oops X Xask() { X local question default answer X question=$1 X default=$2 X if [ -z "${PACKAGE_BUILDING}" ]; then X read -p "${question} [${default}]? " answer X fi X if [ x${answer} = x ]; then X answer=${default} X fi X echo ${answer} X} X Xyesno() { X local dflt question answer X X question=$1 X dflt=$2 X while :; do X answer=$(ask "${question}" "${dflt}") X case "${answer}" in X [Yy]*) return 0;; X [Nn]*) return 1;; X esac X echo "Please answer yes or no." X done X} X X#if /usr/sbin/pw groupshow "${group}" 2>/dev/null; then X# echo "You already have a group \"${group}\", so I will use it." X#else X# echo "You need a group \"${group}\"." X# if yesno "Would you like me to create it" y; then X# /usr/sbin/pw groupadd ${group} -h - || exit X# echo "Done." X# else X# echo "Please create it, and try again." X# exit 1 X# fi X#fi X Xif /usr/sbin/pw user show "${user}" 2>/dev/null; then X echo "You already have a user \"${user}\", so I will use it." Xelse X echo "You need a user \"${user}\"." X if yesno "Would you like me to create it" y; then X /usr/sbin/pw useradd ${user} -g ${group} -h - -d /nonexistent \ X -s /nonexistent -c "Oops Cache System" || exit X echo "Done." X else X echo "Please create it, and try again." X exit 1 X fi Xfi END-of-oops/pkg/INSTALL echo c - oops/patches mkdir -p oops/patches > /dev/null 2>&1 echo x - oops/patches/patch-aa sed 's/^X//' >oops/patches/patch-aa << 'END-of-oops/patches/patch-aa' X--- src/Makefile.in.orig Sun May 14 17:52:23 2000 X+++ src/Makefile.in Tue Aug 29 01:59:21 2000 X@@ -17,6 +17,8 @@ X X VER=@VER@ X OOPSPATH=@prefix@/oops X+OOPSSBIN=@prefix@/sbin X+OOPSETC=@prefix@/etc/oops X X .c.o: X ${CC} -c ${CFLAGS} ${CDEFS} $< X@@ -28,66 +30,37 @@ X ${CC} ${CFLAGS} ${OBJS} ${LIBS} ${LDFLAGS} -o oops X X mkinstalldirs: X- ../mkinstalldirs ${OOPSPATH} ${OOPSPATH}/logs ${OOPSPATH}/DB ${OOPSPATH}/storages ${OOPSPATH}/tables ${OOPSPATH}/modules X+ ../mkinstalldirs ${OOPSPATH} ${OOPSETC} ${OOPSPATH}/logs ${OOPSPATH}/DB ${OOPSPATH}/storages ${OOPSETC}/tables ${OOPSETC}/modules X if [ "X@OOPS_USER@" != "X" ]; then\ X ${CHOWN} @OOPS_USER@ ${OOPSPATH};\ X+ ${CHOWN} @OOPS_USER@ ${OOPSETC};\ X ${CHOWN} @OOPS_USER@ ${OOPSPATH}/logs;\ X ${CHOWN} @OOPS_USER@ ${OOPSPATH}/DB;\ X ${CHOWN} @OOPS_USER@ ${OOPSPATH}/storages;\ X- ${CHOWN} @OOPS_USER@ ${OOPSPATH}/tables;\ X- ${CHOWN} @OOPS_USER@ ${OOPSPATH}/modules;\ X+ ${CHOWN} @OOPS_USER@ ${OOPSETC}/tables;\ X+ ${CHOWN} @OOPS_USER@ ${OOPSETC}/modules;\ X fi X X install: all mkinstalldirs X- $(INSTALL) oops ${OOPSPATH} X- if [ -f ${OOPSPATH}/oops.cfg ]; then\ X- $(INSTALL_DATA) oops.cfg ${OOPSPATH}/oops.cfg.sample ;\ X- else\ X- $(INSTALL_DATA) oops.cfg ${OOPSPATH}/oops.cfg ;\ X- fi X- if [ -f ${OOPSPATH}/err_template.html ]; then\ X- $(INSTALL_DATA) err_template.html ${OOPSPATH}/err_template.html.sample ;\ X- else\ X- $(INSTALL_DATA) err_template.html ${OOPSPATH}/err_template.html ;\ X- fi X- if [ -f ${OOPSPATH}/auth_template.html ]; then\ X- $(INSTALL_DATA) auth_template.html ${OOPSPATH}/auth_template.html.sample ;\ X- else\ X- $(INSTALL_DATA) auth_template.html ${OOPSPATH}/auth_template.html;\ X- fi X- if [ -f ${OOPSPATH}/passwd ]; then\ X- $(INSTALL_DATA) passwd ${OOPSPATH}/passwd.sample ;\ X- else\ X- $(INSTALL_DATA) passwd ${OOPSPATH}/passwd ;\ X- fi X- if [ -f ${OOPSPATH}/redir_rules ]; then\ X- $(INSTALL_DATA) redir_rules ${OOPSPATH}/redir_rules.sample ;\ X- else\ X- $(INSTALL_DATA) redir_rules ${OOPSPATH}/redir_rules ;\ X- fi X- if [ -f ${OOPSPATH}/redir_template.html ]; then\ X- $(INSTALL_DATA) redir_template.html ${OOPSPATH}/redir_template.html.sample ;\ X- else\ X- $(INSTALL_DATA) redir_template.html ${OOPSPATH}/redir_template.html ;\ X- fi X- if [ -f ${OOPSPATH}/accel_maps ]; then\ X- $(INSTALL_DATA) accel_maps ${OOPSPATH}/accel_maps.sample ;\ X- else\ X- $(INSTALL_DATA) accel_maps ${OOPSPATH}/accel_maps ;\ X- fi X- if [ -f ${OOPSPATH}/acl_local_networks ]; then\ X- $(INSTALL_DATA) acl_local_networks ${OOPSPATH}/acl_local_networks.sample ;\ X- else\ X- $(INSTALL_DATA) acl_local_networks ${OOPSPATH}/acl_local_networks ;\ X- fi X+ $(INSTALL) oops ${OOPSSBIN} X+ X+ $(INSTALL_DATA) oops.cfg ${OOPSETC}/oops.cfg.sample X+ $(INSTALL_DATA) err_template.html ${OOPSETC}/err_template.html.sample X+ $(INSTALL_DATA) auth_template.html ${OOPSETC}/auth_template.html.sample X+ $(INSTALL_DATA) passwd ${OOPSETC}/passwd.sample X+ $(INSTALL_DATA) redir_rules ${OOPSETC}/redir_rules.sample X+ $(INSTALL_DATA) redir_template.html ${OOPSETC}/redir_template.html.sample X+ $(INSTALL_DATA) accel_maps ${OOPSETC}/accel_maps.sample X+ $(INSTALL_DATA) acl_local_networks ${OOPSETC}/acl_local_networks.sample X+ X if test "X@SOFLAGS@" != "X"; then \ X for m in modules/*so ; do \ X- $(INSTALL) $$m ${OOPSPATH}/modules ; \ X+ $(INSTALL) $$m ${OOPSETC}/modules ; \ X done; \ X- $(INSTALL) modules/oopsctl ${OOPSPATH}; \ X+ $(INSTALL) modules/oopsctl ${OOPSETC}; \ X fi X for t in tables/*.tab ; do \ X- $(INSTALL_DATA) $$t ${OOPSPATH}/tables ; \ X+ $(INSTALL_DATA) $$t ${OOPSETC}/tables ; \ X done X X oops.o: oops.c oops.h version.h environment.h extern.h END-of-oops/patches/patch-aa echo x - oops/patches/patch-ab sed 's/^X//' >oops/patches/patch-ab << 'END-of-oops/patches/patch-ab' X--- src/oops.c.orig Mon Aug 28 23:04:35 2000 X+++ src/oops.c Mon Aug 28 23:07:59 2000 X@@ -23,8 +23,12 @@ X #undef OOPS_MAIN X X #include "version.h" X- X+#ifndef __FreeBSD__ X char *configfile = "oops.cfg"; X+#endif X+#ifdef __FreeBSD__ X+char *configfile = "%%PREFIX%%/etc/oops/oops.cfg"; X+#endif X int readconfig(char*); X int cidr_net_cmp(const void *, const void *); X int operation; END-of-oops/patches/patch-ab echo x - oops/patches/patch-ac sed 's/^X//' >oops/patches/patch-ac << 'END-of-oops/patches/patch-ac' X--- src/oops.cfg.in.orig Fri Jun 9 19:16:08 2000 X+++ src/oops.cfg.in Tue Aug 29 01:22:55 2000 X@@ -33,14 +33,14 @@ X # When used in form 'filename [{N S}] [[un]buffered]' X # will be rotated automatically (up to N files up to S bytes in size) X ## X-logfile /dev/tty X-#logfile @prefix@/oops/logs/oops.log { 3 1m } unbuffered X+#logfile /dev/tty X+logfile @prefix@/oops/logs/oops.log { 3 1m } unbuffered X X ## X # Accesslog - the same as for squid. Re rotating - see note for logfile X ## X-accesslog /dev/tty X-#accesslog @prefix@/oops/logs/access.log X+#accesslog /dev/tty X+accesslog @prefix@/oops/logs/access.log X X ## X # Pidfile. for kill -1 `cat oops.pid` and for locking. X@@ -202,7 +202,7 @@ X #acl BADPORTS port [0:79],110,138,139,513,[6000:6010] X #acl BADDOMAIN dstdom baddomain1.com baddomain2.com X #acl BADDOMREGEX dstdom_regex baddomain\.((com)|(org)) X-#acl LOCAL_NETWORKS src_ip include:@prefix@/oops/acl_local_networks X+#acl LOCAL_NETWORKS src_ip include:@prefix@/etc/oops/acl_local_networks X #acl BADNETWORKS src_ip 192.168.10/24 X #acl WORKTIME time Mon,Tue:Fri 0900:1800 X acl ADMINS src_ip 127.0.0.1 X@@ -405,9 +405,9 @@ X default_charset koi8-r X X # Recode tables and other charset stuff X- CharsetRecodeTable windows-1251 @prefix@/oops/tables/koi-win.tab X- CharsetRecodeTable ISO-8859-5 @prefix@/oops/tables/koi-iso.tab X- CharsetRecodeTable ibm866 @prefix@/oops/tables/koi-alt.tab X+ CharsetRecodeTable windows-1251 @prefix@/etc/oops/tables/koi-win.tab X+ CharsetRecodeTable ISO-8859-5 @prefix@/etc/oops/tables/koi-iso.tab X+ CharsetRecodeTable ibm866 @prefix@/etc/oops/tables/koi-alt.tab X CharsetAgent windows-1251 AIR_Mosaic IWENG/1 MSIE WinMosaic (Windows (WinNT; X CharsetAgent windows-1251 (Win16; (Win95; (Win98; (16-bit) Opera/3.0 X CharsetAgent ibm866 DosLynx Lynx2/OS/2 X@@ -417,7 +417,7 @@ X # error reporting module X X # template X- template @prefix@/oops/err_template.html X+ template @prefix@/etc/oops/err_template.html X X # Language to use when generate Error messages X lang ru X@@ -434,8 +434,8 @@ X X realm oops X scheme Basic X- file @prefix@/oops/passwd X- template @prefix@/oops/auth_template.html X+ file @prefix@/etc/oops/passwd X+ template @prefix@/etc/oops/auth_template.html X } X X module redir { X@@ -452,8 +452,8 @@ X # you don't have to reconfigure oops each time X # you edit rules or template, they will be reloaded authomatically X X- file @prefix@/oops/redir_rules X- template @prefix@/oops/redir_template.html X+ file @prefix@/etc/oops/redir_rules X+ template @prefix@/etc/oops/redir_template.html X X # This module can process requests which come on http_port X # and/or on different port. For example, you wish oops X@@ -469,7 +469,7 @@ X X module oopsctl { X # path to oopsctl unix socket X- socket_path @prefix@/oops/logs/oopsctl X+ socket_path @prefix@/etc/oops/logs/oopsctl X # time to auto-refresh page (seconds) X html_refresh 300 X } X@@ -504,7 +504,7 @@ X # File with maps and other config directives X # Checked once per minute. No need to restart oops if maps changed X ## X-# file @prefix@/oops/accel_maps X+# file @prefix@/etc/oops/accel_maps X #} X X ## END-of-oops/patches/patch-ac exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008282234.e7SMYOI20159>