Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130714 - Should apcupsd use webapp-config if cgi is requested?
Summary: Should apcupsd use webapp-config if cgi is requested?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Lowest enhancement (vote)
Assignee: Michael Imhof (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-21 04:32 UTC by Etaoin Shrdlu
Modified: 2006-06-21 11:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
apcupsd-3.12.3.ebuild (apcupsd-3.12.3.ebuild,2.84 KB, text/plain)
2006-05-23 22:21 UTC, Kevin Daughtridge
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Etaoin Shrdlu 2006-04-21 04:32:08 UTC
Well, don't know if this is a feature or a bug...currently it puts the cgi directly in /var/www/apcupsd.
Comment 1 Conrad Kostecki gentoo-dev 2006-05-04 07:43:33 UTC
Yes!
It should!
Comment 2 Michael Imhof (RETIRED) gentoo-dev 2006-05-04 11:09:53 UTC
Great, so please provide an updated ebuild using webapp-config.
Comment 3 Kevin Daughtridge 2006-05-23 22:17:00 UTC
I've prepared an ebuild for 3.12.3 which uses webapp.eclass. It also fixes some unrelated issues as I described in bug 132157.

Because webapp provides a CGIBINDIR which is most appropriate for apcupsd's *.cgi, the use of depend.apache and the apache2/lighttpd DEPENDs, USEs, and .conf files are unnecessary. It doesn't appear, however, that lighttpd is currently supported by webapp. This would be a regression in that sense--but the webapp contents could be manually copied into a lighttpd server root.

Other changes: --with-css-dir is no longer available, and I've replaced it with a manual mv to MY_CGIBINDIR in src_install. Because apcupsd is mostly a system daemon and doesn't touch htdocs, I've set WEBAPP_MANUAL_SLOT. I dropped the X*DIR global variables, which don't seem to serve any useful purpose now, and added --mandir. There's also a note about the CGIs moving from /var/www/apcupsd into webapp.
Comment 4 Kevin Daughtridge 2006-05-23 22:21:14 UTC
Created attachment 87358 [details]
apcupsd-3.12.3.ebuild

This ebuild merges and runs (daemon and CGI) properly for me on x86 with USE="+cgi +doc +ncurses +nls -snmp +threads +usb +vhosts". Since I'm +vhosts, I can't speak for the webapp auto-setup.
Comment 5 Etaoin Shrdlu 2006-05-25 04:40:45 UTC
(In reply to comment #4)
> Created an attachment (id=87358) [edit]
> apcupsd-3.12.3.ebuild
> 
> This ebuild merges and runs (daemon and CGI) properly for me on x86 with
> USE="+cgi +doc +ncurses +nls -snmp +threads +usb +vhosts". Since I'm +vhosts, I
> can't speak for the webapp auto-setup.

I get this when I try to build it:

# emerge -Dav apcupsd

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] sys-power/apcupsd-3.12.3  +cgi -doc +ncurses +nls -snmp +threads -usb -vhosts 0 kB [1]

Total size of downloads: 0 kB
Portage overlays:
 [1] /usr/local/portage

Do you want me to merge these packages? [Yes/No] y
>>> emerge (1 of 1) sys-power/apcupsd-3.12.3 to /
>>> md5 files   ;-) apcupsd-3.12.3.ebuild
>>> md5 files   ;-) files/digest-apcupsd-3.12.3
>>> md5 src_uri ;-) apcupsd-3.12.3.tar.gz
 *
 * This ebuild overrides the default SLOT behaviour for webapps
 * If this package installs files into the htdocs dir, this is
 * probably a bug in the ebuild.
 *
>>> Unpacking source...
>>> Unpacking apcupsd-3.12.3.tar.gz to /var/tmp/portage/apcupsd-3.12.3/work

 * Cannot find $EPATCH_SOURCE!  Value for $EPATCH_SOURCE is:
 *
 *   /usr/local/portage/sys-power/apcupsd/files/3.12.3/apcupsd.in.patch
 *   ( apcupsd.in.patch )


!!! ERROR: sys-power/apcupsd-3.12.3 failed.
!!! Function epatch, Line 196, Exitcode 0
!!! Cannot find $EPATCH_SOURCE!
!!! If you need support, post the topmost build error, NOT this status message.
Comment 6 Kevin Daughtridge 2006-05-25 10:55:38 UTC
(In reply to comment #5)

Sorry, forgot to mention -- as with previous versions, this ebuild expects the FILESDIR files to be in files/3.12.3/. Just create that directory and copy the two patches from files/3.12.2/.

The message about manual SLOTting is from webapp.eclass and unavoidable.
Comment 7 Etaoin Shrdlu 2006-05-26 03:05:06 UTC
(In reply to comment #6)
> (In reply to comment #5)
> 
> Sorry, forgot to mention -- as with previous versions, this ebuild expects the
> FILESDIR files to be in files/3.12.3/. Just create that directory and copy the
> two patches from files/3.12.2/.
> 
> The message about manual SLOTting is from webapp.eclass and unavoidable.

Ok, works fine for me. The "+doc" behaves differently from the standard ebuild also, I had to disable it otherwise it wanted to pull in *a lot* of dependencies, among which latex2html and ghostscript! Is this the expected behaviour?

Thanks for now.
Comment 8 Kevin Daughtridge 2006-05-26 12:23:17 UTC
(In reply to comment #7)

In previous versions, +doc pulled in the full manual, which was included fully built in the tarball. In 3.12.*, the manual has been converted from texinfo to LaTeX, and is only included as its LaTeX source. TeX is, of course, required to build it, and unfortunately even the PDF won't generate properly without latex2html.

Other packages have somewhat heavy +doc requirements: those that use doxygen pull in ghostscript, and gtk-doc needs opensp and openjade. For apcupsd, the 200-some MB of teTeX does seem excessive. On the other hand, the whole purpose of USE=doc is to allow selective control of this.

Ideally, upstream would distribute the built manual too--it might be worth asking. As for the ebuild, I suppose it could go either way, but I'd prefer the choice.
Comment 9 Michael Imhof (RETIRED) gentoo-dev 2006-06-21 11:30:15 UTC
In cvs.
Thanks for your help.