From owner-freebsd-ports@FreeBSD.ORG Sun Mar 29 21:53:34 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from straylight.ringlet.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with SMTP id 8DA67106566B for ; Sun, 29 Mar 2009 21:53:33 +0000 (UTC) (envelope-from roam@ringlet.net) Received: (qmail 23602 invoked by uid 1000); 29 Mar 2009 21:52:52 -0000 Date: Mon, 30 Mar 2009 00:52:52 +0300 From: Peter Pentchev To: freebsd-ports@freebsd.org Message-ID: <20090329215252.GA1134@straylight.m.ringlet.net> References: <20090328133315.3d7f9027@scorpio> <20090328174313.GD71365@lor.one-eyed-alien.net> <20090328160730.1f7a8ff0@scorpio> <20090328234250.GE71365@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5vNYLRcllDrimb99" Content-Disposition: inline In-Reply-To: <20090328234250.GE71365@lor.one-eyed-alien.net> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: Brooks Davis Subject: Re: Installing in cgi-bin X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2009 21:53:34 -0000 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 28, 2009 at 06:42:50PM -0500, Brooks Davis wrote: > On Sat, Mar 28, 2009 at 04:07:30PM -0400, Jerry wrote: > > On Sat, 28 Mar 2009 12:43:13 -0500 > > Brooks Davis wrote: > >=20 > > >On Sat, Mar 28, 2009 at 01:33:15PM -0400, Jerry wrote: > > >> I have a Perl program that I am thinking of porting to FreeBSD. The > > >> program has to be installed in the 'cgi-bin'.=20 > > >>=20 > > >> I was thinking something like: > > >> "$(WWWDIR}/apache${APACHE_VERSION}/cgi-bin" might be the way to > > >> direct the install to the correct directory. Is there a better way? > > >> I cannot find a macro that directly references the cgi-bin. > > > > > >We have a policy against installations that would automaticlly be on > > >the network. You need to install it elsewhere (often a directory > > >under WWWDIR) and tell people how to add the appropriate configuration > > >directives to http.conf or to copy the file into cgi-bin in > > >pkg-message. > >=20 > >=20 > > The program is DADA Mail. It installs a 'mail.cgi' in the cgi-bin and > > then installs the rest of its files, perl modules, etc. in a hierarchy > > several layers deep in the cgi-bin directory. We are talking > > about a lot of files here. Expecting the end user to properly move the > > files from a temporary directory to the cgi-bin and then properly > > changing the file(s) properties would seem a little extreme. However, > > if that is the only way I can do it, I will investigate writing a > > script that the end user could invoke to accomplish this feat. It does > > seem a little over the top however. Due to the way DADA Mail is > > written, the author does not believe it can be run from other than that > > directory along with its associated files. >=20 > Sounds seriously broken. :) I might suggest installing in www/dada and > providing a script to make appropriate symlinks along with an instruction > to enable following symlinks in cgi-bin. It seems like shockingly bad > design to require that it live at http://.../cgi-bin/mail.cgi, but > that's certainly not uncommon. :( Jerry, take a look at how other ports do it - e.g. mail/qmailadmin or devel/viewvc. Both of those install files into separate directories and then expect the user to symlink the CGI directory to something within the user's "real" cgi-bin directory, and possibly symlink a data directory into something within the user's "real" data directory. Thus, the CGI script is at http://hostname/cgi-bin/qmailadmin/qmailadmin.cgi with the option of someday adding e.g. cgi-bin/qmailadmin/somethingelse.cgi by simply placing it within the symlinked directory. Of course, the symlinks may also be avoided by using Apache's Alias and ScriptAlias directives :) Either way, the major point is that once you learn to live with all files being in cgi-bin/progname/ instead of just cgi-bin/, it's just a matter of symlinking (or aliasing) a single directory instead of each and every file within it. G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@space.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 =2Esiht ekil ti gnidaer eb d'uoy ,werbeH ni erew ecnetnes siht fI --5vNYLRcllDrimb99 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAknP7bMACgkQ7Ri2jRYZRVOkiwCfRr/z7bgu8oRqL6v/Q5va3XcR XmAAnREOays8652zUtxGE2+foMFN0WcX =QhhG -----END PGP SIGNATURE----- --5vNYLRcllDrimb99--