Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 166853 - webapp-config: show-installed+directory in vhosts environment expands directories improperly.
Summary: webapp-config: show-installed+directory in vhosts environment expands directo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-14 16:19 UTC by Sean Smith
Modified: 2008-02-18 16:01 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Smith 2007-02-14 16:19:28 UTC
When using webapp-config to show what applications are installed in a specific directory (using --si or --show-installed), it improperly expands the -d switch to include "/var/www/localhost/htdocs" as well.  This happens to be in an environment where USE="vhosts" is defined.

Using the -h switch to specify a specific virtual host and then changing -d to use the path relative to the virtual host works.  However, this seems to be a fallacy.

Assumed proper behavior would dictate that -d, if passed an absolute path (as provided in output by "webapp-config -li") should not expand the -d input with default system host.

Reproducible: Always

Steps to Reproduce:
1. In /etc/make.conf: USE="${USE} vhosts"
2. Install various web applications in virtual hosts via 'webapp-config'
3. Perform a "webapp-config --li" to list all installed web applications on the server.
4. Use the output from step 3 in a "webapp-config --si -d [dir]" to find out what version is installed.
Actual Results:  
Where sis is a virtual host on this Apache server...
zeus ~ # webapp-config --li
/var/www/sis/htdocs/cacti
/var/www/sis/htdocs/phpmyadmin
/var/www/sis/htdocs/phpsyslogng

zeus ~ # webapp-config --si -d /var/www/sis/htdocs/cacti
* Fatal error: No .webapp file in /var/www/localhost/htdocs/var/www/sis/htdocs/cacti; unable to continue
* Fatal error(s) - aborting


Expected Results:  
webapp-config should have understood -d as an absolute path in this instance.  

The concept for the use of this is to use it in the following loop:
for dir in `webapp-config --li`
do
   echo $dir
   webapp-config --si -d $dir
done

Which would list all the locations and versions of web applications installed via webapp-config.  This aids in ensuring that the various web applications have been upgraded to the newest version (or identifying ones with security issues, when coupled with GLSA).

Of course, cutting on the 3rd field in the above instance to identify the virtual host would work, but what if web applications were installed in a non standard manner?  Having this behavior, especially since the output used is from the same command, would greatly enhance the use of webapp-config in identifying potential issues.
Comment 1 Renat Lumpau (RETIRED) gentoo-dev 2007-03-01 01:40:10 UTC
just to make sure i understand you correctly: you want to be able to use -d with an absolute path?
Comment 2 Sean Smith 2007-03-01 02:14:34 UTC
(In reply to comment #1)
> just to make sure i understand you correctly: you want to be able to use -d
> with an absolute path?
> 

Yes, that would be ideal.  Thanks for the consideration.
Comment 4 Benedikt Böhm (RETIRED) gentoo-dev 2008-02-17 18:06:44 UTC
fixed in 1.50.16-r3
Comment 5 Sean Smith 2008-02-18 16:01:52 UTC
Thanks, works as expected!  I appreciate the help.  In fact, I've already used it in the intended manner (described below) and found a few places where the software hasn't been updated.