FS#16554 - [network-ups-tools] is being built without cgi-bin, html interface or documentation
Attached to Project:
Community Packages
Opened by David C. Rankin (drankinatty) - Saturday, 10 October 2009, 05:16 GMT
Last edited by Dan Griffiths (Ghost1227) - Saturday, 13 March 2010, 04:23 GMT
Opened by David C. Rankin (drankinatty) - Saturday, 10 October 2009, 05:16 GMT
Last edited by Dan Griffiths (Ghost1227) - Saturday, 13 March 2010, 04:23 GMT
|
Details
Description:
network-ups-tools (nut) is currently being built without the cgi-bin and html interface. The web interface is a normal part of nut that allows you to view and set ups parameters. It doesn't look like any of that is enabled in the current arch package. Additionally, the package does not contain any of the documentation provided along with the source such as the "Upgrade" notes, etc. It looks like the following configure parameters will provide the missing pieces: ./configure '--prefix=/usr' \ '--sysconfdir=/etc' \ '--localstatedir=/var' \ '--mandir=/usr/share/man' \ '--datadir=/usr/share' \ '--docdir=/usr/share/doc/nut' \ '--with-all' \ '--with-cgipath=/srv/http/cgi-bin/nut' \ '--with-htmlpath=/srv/http/nut' Additional info: * package version(s) * config and/or log files etc. Steps to reproduce: |
This task depends upon
Closed by Dan Griffiths (Ghost1227)
Saturday, 13 March 2010, 04:23 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed based on drankinatty's pkgbuiild, please test and advise
Saturday, 13 March 2010, 04:23 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed based on drankinatty's pkgbuiild, please test and advise
build() {
cd $srcdir/nut-$pkgver
./configure --with-user=nut \
--prefix=/usr \
--datadir=/usr/share/ups \
--sysconfdir=/etc/ups \
--with-group=nut \
--with-hal \
--with-usb \
--with-cgi \
--with-cgipath=/srv/http/cgi-bin/nut \
--with-htmlpath=/srv/http/nut \
--with-udev-dir=/etc/udev || return 1
<snip>
I'll see how this works
http://www.3111skyline.com/download/screenshots/archlinux/network-ups-tools-rebuilt.jpg
Now it somebody could just make those the defaults, you wouldn't have to rebuild the package to get the web interface working. Let me know if you need anything else. Thanks.
http://wiki.archlinux.org/index.php/Web_application_package_guidelines
lets try to improve it based on this guide
My bad on the issue of writing to srv. I modeled it on the openSuSE package which put the cgi files in /srv/www/cgi-bin/nut and the html files in /srv/www/htdocs/nut. Initially when I set up my Arch server I just moved my web apps from suse to Arch under /srv/www and the edited the httpd.conf file accordingly. I have since moved all web apps to /srv/http which seems to be the Arch standard. For web apps, especially with the tighter security required by php 5.3, it is difficult to install them anywhere without placing the web parts under the web server document root or needing to modify the apache config and add a new directory definition and then if php is required editing php.ini.
Arch defaults to /srv/http/cgi-bin for cgi files in its httpd.conf, see line 316:
316 ScriptAlias /cgi-bin/ "/srv/http/cgi-bin/"
so with the nut application needing to install both the cgi file and html files, the directory choices of /srv/http/cgi-bin/nut and /srv/http/nut, respectively, seemed appropriate. The files can go anywhere of course, so long as the web server can reach and use the files provided. Biru, what are your thought on how we can make it comply with the guidelines? Thanks.
I'll be happy with whatever decision of web app file placement is made by Arch, but it seems like not putting the cgi and web pages under /srv is a departure even from Arch's norm. The only other place for the cgi or web pages that strikes me as making sense is under /var like /var/srv/{cgi-bin/pkgname,htdocs/pkgname}. That way apache and php could be configured with /var/srv as a directory so config changes wouldn't be required with every web app installed. That would just mean changing the default httpd.conf and php.ini, but web apps will install OK.