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. G'luck, Peter -- Peter Pentchev r...@ringlet.netr...@space.bgr...@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. pgpVuJWZnG8kG.pgp Description: PGP signature
Re: Packaging data for a CGI
Peter Pentchev wrote: 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. Sorry, I don't think I explained my self clearly enough. The problem is that the CGI generates HTML which has links which look like: /hoogle/hoogle.css /hoogle/hoogle.png /hoogle/hoogle.js which the web client would interpret as: http://host-cgi-was-served-from/hoogle/hoogle.css and so on. The obvious solution is to put them in /var/www/hoogle/ but this location seems to be discouraged by the policy manual. I was wondering if there was another solution. Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: Packaging data for a CGI
Erik de Castro Lopo a écrit : Where should I put these resources? Try to look at darcsweb which faces the exact same problem. Cheers, -- Mehdi Dogguy مهدي الدڤي http://www.pps.jussieu.fr/~dogguy Tel.: (+33).1.44.27.28.38 -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: Packaging data for a CGI
On Sat, Jun 20, 2009 at 08:08:49PM +1000, Erik de Castro Lopo wrote: Peter Pentchev wrote: 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. Sorry, I don't think I explained my self clearly enough. The problem is that the CGI generates HTML which has links which look like: /hoogle/hoogle.css /hoogle/hoogle.png /hoogle/hoogle.js which the web client would interpret as: http://host-cgi-was-served-from/hoogle/hoogle.css and so on. The obvious solution is to put them in /var/www/hoogle/ but this location seems to be discouraged by the policy manual. I was wondering if there was another solution. Yes, there is, and that's exactly what I meant :) Sorry for not explaining this more clearly, or pointing at a specific package; take a look at e.g. the phpmyadmin or phppgadmin packages. (of course, I am not a Debian Developer, so the following might not necessarily be the right way of doing things; it's just that I've seen it done in more than one package) Your package should place the files into /usr/share/hoogle/www/. After that, it should either create a file in /etc/apache2/conf.d/ containing something like this (that's what phppgadmin does): Alias /hoogle /usr/share/hoogle/www/ Directory /usr/share/hoogle/www Order allow,deny Allow from all # Any other options your data files might need /Directory ...or it should instruct the user to do that for the virtual hosts she wants it active on. It may also install a symlink in /var/www/hooogle/ pointing to /usr/share/hoogle/www/. The latter two options are what the phpmyadmin package does; also see its README.Debian file. G'luck, Peter -- Peter Pentchev r...@ringlet.netr...@space.bgr...@freebsd.org PGP key:http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 You have, of course, just begun reading the sentence that you have just finished reading. pgpVx56hZnWbk.pgp Description: PGP signature
Re: Packaging data for a CGI
Mehdi Dogguy wrote: Erik de Castro Lopo a écrit : Where should I put these resources? Try to look at darcsweb which faces the exact same problem. Thanks Mehdi. That looks like what I'm after. Cheers, Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: Packaging data for a CGI
On Sat, Jun 20, 2009 at 6:52 PM, Peter Pentchevr...@ringlet.net wrote: Your package should place the files into /usr/share/hoogle/www/. After that, it should either create a file in /etc/apache2/conf.d/ containing something like this (that's what phppgadmin does): Alias /hoogle /usr/share/hoogle/www/ Uhh, doesn't that mean the package will clobber /hoogle for every vhost on the server? -- bye, pabs http://wiki.debian.org/PaulWise -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: Packaging data for a CGI
On Sat, Jun 20, 2009 at 08:39:46PM +0800, Paul Wise wrote: On Sat, Jun 20, 2009 at 6:52 PM, Peter Pentchevr...@ringlet.net wrote: Your package should place the files into /usr/share/hoogle/www/. After that, it should either create a file in /etc/apache2/conf.d/ containing something like this (that's what phppgadmin does): Alias /hoogle /usr/share/hoogle/www/ Uhh, doesn't that mean the package will clobber /hoogle for every vhost on the server? Actually, it does - that's why I mentioned phpmyadmin's advising the user to do that only for the virtual hosts that need it. G'luck, Peter -- Peter Pentchev r...@ringlet.netr...@space.bgr...@freebsd.org PGP key:http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 If I were you, who would be reading this sentence? pgpnV3r7czIoH.pgp Description: PGP signature
Re: Packaging data for a CGI
In 20090620133708.gc1...@straylight.m.ringlet.net, Peter Pentchev wrote: On Sat, Jun 20, 2009 at 08:39:46PM +0800, Paul Wise wrote: On Sat, Jun 20, 2009 at 6:52 PM, Peter Pentchevr...@ringlet.net wrote: Your package should place the files into /usr/share/hoogle/www/. After that, it should either create a file in /etc/apache2/conf.d/ containing something like this (that's what phppgadmin does): Alias /hoogle /usr/share/hoogle/www/ Uhh, doesn't that mean the package will clobber /hoogle for every vhost on the server? Actually, it does Alternatively, you could put it as a file in /etc/apache2/sites-available. Then it can easily be enabled if the administrator desires, but it is disabled by default. Debian.README should document that fact, but experienced Apache 2.x on Debian administrators will find it right away. If it isn't appropriate to activate in any non-trivial environment, it might be better as /usr/share/doc/hoogle/apache.conf.example -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/\_/ signature.asc Description: This is a digitally signed message part.
Packaging data for a CGI
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? Cheers, Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org