From owner-freebsd-www@FreeBSD.ORG Sat Aug 16 15:52:08 2008 Return-Path: Delivered-To: freebsd-www@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E19E81065674 for ; Sat, 16 Aug 2008 15:52:08 +0000 (UTC) (envelope-from simon@benji.nitro.dk) Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38]) by mx1.freebsd.org (Postfix) with ESMTP id 8E1F58FC0C for ; Sat, 16 Aug 2008 15:52:08 +0000 (UTC) (envelope-from simon@benji.nitro.dk) Received: from benji.nitro.dk (unknown [192.168.3.39]) by mx.nitro.dk (Postfix) with ESMTP id 33F891E8C27 for ; Sat, 16 Aug 2008 15:33:46 +0000 (UTC) Received: by benji.nitro.dk (Postfix, from userid 2000) id 31DF5100D2; Sat, 16 Aug 2008 16:33:44 +0100 (BST) Date: Sat, 16 Aug 2008 16:33:43 +0100 From: "Simon L. Nielsen" To: freebsd-www@freebsd.org Message-ID: <20080816153342.GA1609@zaphod.nitro.dk> References: <20080809070725.GA57707@rwpc12.mby.riverwillow.net.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="mxv5cy4qt+RJ9ypb" Content-Disposition: inline In-Reply-To: <20080809070725.GA57707@rwpc12.mby.riverwillow.net.au> User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: query-pr for mirror site X-BeenThere: freebsd-www@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD Project Webmasters List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2008 15:52:09 -0000 --mxv5cy4qt+RJ9ypb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2008.08.09 17:07:25 +1000, John Marshall wrote: > I have been looking at getting some of the CGI scripts working (haven't > found any documentation) and find that query-pr.cgi and friends need > /usr/local/bin/query-pr.web. > > I can't find query-pr.web anywhere. Perhaps it is part of a port which > is no longer in the ports tree? Perhaps I just haven't looked hard > enough? No, this script is actually only directly on www.freebsd.org server, but it is just a wrapper around query-pr which is there to limit number of simultaneous queries. I have attached it heree, just FYI. We should probably stick it in www/... > It occurs to me that a server which hosts a mirror of the web site and > of the gnats repository ought to be able to provide PR query services > without too much extra effort. Well, GNATS can get tricky to work, and it's not pretty... > I have discovered that to get the cvsweb.cgi script working I needed to > install the devel/cvsweb3 port and create a link to the cvs repository; > and that to get the ports.cgi script working I had to install the > converters/p5-Convert-UU port and create a link to the ports tree. Hmmm, AFAIR the port shouldn't be required... but I haven't messed with it a while, so I can't recall. > Is the rest of the CGI functionality/configuration documented somewhere > - or shouldn't mirrors be providing these services? It's not documented, and generally we don't expect mirrors to provide CGI services. Actually getting all scripts working is entirely non trivial. One reason for this is that at times we change stuff which will require changes on the server if you use CGI's. -- Simon L. Nielsen --mxv5cy4qt+RJ9ypb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="query-pr.web" #!/bin/sh # # wrapper for query-pr # PATH=/bin:/usr/bin:/usr/local/bin; export PATH pid=$$ lockfile=/tmp/query-pr.lock # max. cpu limit in seconds ulimit -t 30 # allow 2 processes at the same time - avoid locks by long running queries case $pid in *[0-4] ) lockfile=${lockfile}.1 ;; * ) lockfile=${lockfile}.2 ;; esac # no locking for --list commands case $1 in --list-categories | --list-states | --list-classes ) exec /usr/local/bin/query-pr $1;; esac lockf -t 60 $lockfile nice -10 /usr/local/bin/query-pr "$@" sleep 0.5 --mxv5cy4qt+RJ9ypb--