[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packaging data for a CGI

On Sat, Jun 20, 2009 at 01:36:25PM +1000, Erik de Castro Lopo wrote:
> Hi all,
> I'm packaging a command line app called hoogle that can also run as
> a CGI (depending on whether QUERY_STRING or REQUEST_URI is defined).
> The source package generates three binary packages:
>    hoogle - the binary
>    hoogle-data - architecture independant data
>    hoogle-cgi - creates a symlink from /usr/lib/cgi-bin to the binary
>                 in /usr/bin/
> The issue I'm having is that the CGI also has some resources (an
> XML file, a javascript file and some PNGs) that need to be put
> somewhere appropriate so the web server can serve them in response
> to a standard HTTP GET.
> I would put this somewhere under /var/www but the  policy manual
> says thats a bad  idea:
>    http://webapps-common.alioth.debian.org/draft/html/ch-issues.html
> Where should I put these resources?

Look at some other packages; I believe the convention is to use
/usr/share/<appname>.  In your case, if there is already stuff in
/usr/share/hoogle/ for the hoogle-data package, you might pick
/usr/share/hoogle/www/ or www-data/ or something like that for
the CGI script's resources.


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
"yields falsehood, when appended to its quotation." yields falsehood, when appended to its quotation.

Attachment: pgpDEtahZ_gWh.pgp
Description: PGP signature

Reply to: