Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26133 - A few webapp-apache additions.
Summary: A few webapp-apache additions.
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Stuart Herbert (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 23400 26114
  Show dependency tree
 
Reported: 2003-08-07 09:56 UTC by Ian Leitch (RETIRED)
Modified: 2003-10-18 18:26 UTC (History)
0 users

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


Attachments
webapp-apache.patch (webapp-apache.patch,1.32 KB, patch)
2003-08-07 09:56 UTC, Ian Leitch (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Leitch (RETIRED) gentoo-dev 2003-08-07 09:56:11 UTC
When tackling a cvsweb bug, I noticed the webapp-apache eclass needed a few 
extras for it to be more useable for ebuilds. 

My patch offers ebuilds the following extra variables:
APACHECONF_COMMON
APACHECONF_DIR
HTTPD_CGIBIN

it also makes HTTPD_ROOT detection use a trailing / when setting a default 
location.

Reproducible: Always
Steps to Reproduce:
Comment 1 Ian Leitch (RETIRED) gentoo-dev 2003-08-07 09:56:40 UTC
Created attachment 15683 [details, diff]
webapp-apache.patch
Comment 2 Brian Jackson (RETIRED) gentoo-dev 2003-08-09 15:19:10 UTC
I'll leave this one to stuart since he seems to be the person in charge of that eclass 
Comment 3 Stuart Herbert (RETIRED) gentoo-dev 2003-08-17 16:36:46 UTC
Sorry for the delay in looking at this.  Here's my feedback on the patch. 
 
The stuff to work out where to put cgi-bin files I've no big problem with.  I'll add that 
to webapp.eclass in the next day or so. 
 
Why do you need the trailing / on the HTTPD_ROOT definition? 
 
Best regards, 
Stu 
Comment 4 Ian Leitch (RETIRED) gentoo-dev 2003-08-17 16:58:43 UTC
Someone could called ${HTTPD_ROOT}somefile.txt (no /) - that'll break, having an extra / in there won't break anything, but it will stop breakage on situations where people forget one. 
Comment 5 Stuart Herbert (RETIRED) gentoo-dev 2003-08-18 05:49:14 UTC
Mmm ... I'm not of fan of allowing people to get away with mistakes like that, but your 
point is well made. 
 
I've committed the patch, and it should be appearing on your local rsync mirror 
within the hour or so.  Please take a look, and confirm that you're happy - then I 
can close this bug. 
 
Best regards, 
Stu 
Comment 6 Ian Leitch (RETIRED) gentoo-dev 2003-08-18 07:12:15 UTC
There are a few layout imperfections where the patch has been applyed, but apart from that I'm happy.

Cheers.
Comment 7 Stuart Herbert (RETIRED) gentoo-dev 2003-08-18 07:16:13 UTC
Those 'imperfections' are where you use a different TAB size to the default for 
eclasses.  Your patch converted the tabs to spaces, and when I edited the patch I 
didn't put the TABs back in. 
 
Best regards, 
Stu 
Comment 8 Carsten Lohrke (RETIRED) gentoo-dev 2003-08-19 12:07:58 UTC
Since the new v1.18 I get 

!!! ERROR: net-www/phpBB-2.0.5 failed.
!!! Function webapp-pkg_setup, Line 80, Exitcode 0
!!! I couldn't find an installation of Apache

It's definitely an eclass/Apache-1 problem, cause it's reproduceable with other ebuilds.
Comment 9 Carsten Lohrke (RETIRED) gentoo-dev 2003-08-19 12:34:12 UTC
fyi: it's the webapp-determine-cgibindir()

-z string
True if the length of string is zero. (and the string usually isn't ;)
Comment 10 Stuart Herbert (RETIRED) gentoo-dev 2003-08-19 14:44:21 UTC
Doh!  And double-doh, because our CVS server is currently borken, so I won't be 
able to commit v1.9 yet :( 
 
Best regards, 
Stu 
  
Comment 11 Ian Leitch (RETIRED) gentoo-dev 2003-08-19 16:00:44 UTC
Forigve me, I've just been to a beer festival... but I don't see how my patch is at fault. The -z is there because if the string is 0 then it sets a default, if it isn't 0 then we already found the cgi-bin dir.
/me thinks its webapp-apache-detect at fault.
Comment 12 Stuart Herbert (RETIRED) gentoo-dev 2003-08-19 16:49:47 UTC
I'm jealous about the beer festival :)  The pub I was in earlier this evening only had 
the one guest ale, and that wasn't available :( 
 
Nothing to forgive ... I didn't spot this first time around, and I have very extensive 
shell programming experience stretching out over ten years and over twenty 
different UNIX variants. 
 
What happens is this.  When there is no explicit 'return' statement from a shell 
function, the return code of the last statement in the function is returned.  
webapp-detect-cgibindir() can return a zero (if the [ -z ... ] test is successful), or a 
one (if the [ -z ... ] test fails). 
 
webapp-detect-cgibindir() is the last statement inside webapp-detect(), so 
webapp-detect() returns whatever webapp-detect-cgibindir() returns.  Unfortunately, 
this means that webapp-detect() can return a 1 even if webapp-apache-detect() 
successfully worked out which apache to use. 
 
The fix that'll go into CVS (when CVS is fixed :) is to make webapp-detect() 
explicitly return a 0 once webapp-detect-cgibindir() has been called. 
 
I hope that clears it up. 
Stu 
Comment 13 Ian Leitch (RETIRED) gentoo-dev 2003-10-18 18:26:22 UTC
This bug is now invalid due to the new webapp system.