Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 523596 - www-apps/wordpress USE=vhosts installs webapps into / instead of /usr/share/webapps/[..] (MY_HTDOCSDIR not set correctly)
Summary: www-apps/wordpress USE=vhosts installs webapps into / instead of /usr/share/w...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-24 09:25 UTC by Leho Kraav (:macmaN @lkraav)
Modified: 2015-09-12 21:22 UTC (History)
3 users (show)

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


Attachments
build.log (wp.log,265.73 KB, text/plain)
2014-09-24 09:27 UTC, Leho Kraav (:macmaN @lkraav)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leho Kraav (:macmaN @lkraav) 2014-09-24 09:25:51 UTC
Current stable seems to be broken. Current unstable 1.53 did not improve this bug.

Downgrading to 1.50.16-r4 fixed it.

Attaching emerge --debug output. Disabling bashrc, resetting /etc/vhosts/webapp-config to distribution default did not improve anything.

Reproducible: Always
Comment 1 Leho Kraav (:macmaN @lkraav) 2014-09-24 09:27:39 UTC
Created attachment 385378 [details]
build.log

search for _ENVVAR to get to variable definitions etc. it seems like variable definitions aren't being expanded properly aynmore, because on the older webapp-config version i can see paths being expanded by _ENVVAR stage.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-24 10:47:39 UTC
Comment on attachment 385378 [details]
build.log

Please attach a build log without `--debug'.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-24 10:53:45 UTC
Please attach a list of installed files as well.
Comment 4 Leho Kraav (:macmaN @lkraav) 2015-04-21 16:59:44 UTC
I'm seeing it again, because webapp-config-1.52 is now the minimum. This is not a www-apps/wordpress bug, it's app-admin/webapp-config. It's also installing /installed_by_webapp_eclass into root for dev-python/django.

Still not sure what's going on. My system configuration is not crazy in any particular way.
Comment 5 Sebastian Pipping gentoo-dev 2015-04-21 18:36:59 UTC
Cannot confirm with app-admin/webapp-config 1.52-r1, nor with 1.53-r2 either.
Wordpress version tested was 4.1.2-r1
Daring to close as obsolete.  Please feel free to re-open if needed.
Comment 6 Sebastian Pipping gentoo-dev 2015-04-22 17:57:01 UTC
PS: This is how to check if your webapp-config setup sets MY_HTDOCSDIR to something reasonable:

  # /usr/sbin/webapp-config --query wordpress 4.1.1 | fgrep MY_HTDOCSDIR
  MY_HTDOCSDIR="/usr/share/webapps//wordpress/4.1.1/htdocs"

The code setting MY_HTDOCSDIR from webapp-config output in webapp.eclass is this:

  if has_version '>=app-admin/webapp-config-1.50'; then
    ENVVAR=$(${WEBAPP_CONFIG} --query ${PN} ${PVR}) || die ....
    eval ${ENVVAR}

Best, Sebastian
Comment 7 Leho Kraav (:macmaN @lkraav) 2015-04-22 18:08:23 UTC
(In reply to Sebastian Pipping from comment #6)
> PS: This is how to check if your webapp-config setup sets MY_HTDOCSDIR to
> something reasonable:
> 
>   # /usr/sbin/webapp-config --query wordpress 4.1.1 | fgrep MY_HTDOCSDIR
>   MY_HTDOCSDIR="/usr/share/webapps//wordpress/4.1.1/htdocs"
> 
> The code setting MY_HTDOCSDIR from webapp-config output in webapp.eclass is
> this:
> 
>   if has_version '>=app-admin/webapp-config-1.50'; then
>     ENVVAR=$(${WEBAPP_CONFIG} --query ${PN} ${PVR}) || die ....
>     eval ${ENVVAR}
> 
> Best, Sebastian

$ /usr/sbin/webapp-config --query wordpress 4.1.1 | grep MY_HTDOCS
MY_HTDOCSBASE="${vhost_htdocs_insecure}"
MY_HTDOCSDIR="${my_appdir}/htdocs"

/etc $ sudo ack appdir

Result is empty. Where does this mystical my_appdir variable come from?
Comment 8 Sebastian Pipping gentoo-dev 2015-04-22 18:44:45 UTC
(In reply to Leho Kraav (:macmaN @lkraav) from comment #7)
> $ /usr/sbin/webapp-config --query wordpress 4.1.1 | grep MY_HTDOCS
> [..]
> MY_HTDOCSDIR="${my_appdir}/htdocs"

Please give me MY_APPDIR (or the whole output as an attachment).
Over here:

  # /usr/sbin/webapp-config --query wordpress 4.1.1 | grep MY_APPDIR
  MY_APPDIR="/usr/share/webapps//wordpress/4.1.1"

Re-opening.
Comment 9 Sebastian Pipping gentoo-dev 2015-04-22 18:58:11 UTC
(In reply to Leho Kraav (:macmaN @lkraav) from comment #7)
> $ /usr/sbin/webapp-config --query wordpress 4.1.1 | grep MY_HTDOCS
> MY_HTDOCSBASE="${vhost_htdocs_insecure}"
> MY_HTDOCSDIR="${my_appdir}/htdocs"

PS: I'm actually surprised that you have "${my_appdir}" in the output unsubstituted while my output is free of dollar signs.

Since those lines are fed to Bash eval, ${my_appdir} would need to be defined at that point, either from before running "webapp-config --query ..." or from one of the previous lines in its output.


> /etc $ sudo ack appdir
> 
> Result is empty. Where does this mystical my_appdir variable come from?

${my_appdir} seems to be used in /usr/lib64/python*/site-packages/WebappConfig/config.py .
Comment 10 Devan Franchini (RETIRED) gentoo-dev 2015-04-22 18:58:55 UTC
Seems to me like it's related to this:
https://bugs.gentoo.org/show_bug.cgi?id=528752
Comment 11 Devan Franchini (RETIRED) gentoo-dev 2015-04-22 18:59:53 UTC
Can you please check if you have dev-python/configparser installed on your system?
Comment 12 Sebastian Pipping gentoo-dev 2015-04-22 19:03:21 UTC
(In reply to Devan Franchini from comment #10)
> Seems to me like it's related to this:
> https://bugs.gentoo.org/show_bug.cgi?id=528752

Awesome, thanks for the pointer!
Comment 13 Devan Franchini (RETIRED) gentoo-dev 2015-04-22 19:08:08 UTC
(In reply to Sebastian Pipping from comment #12)
> (In reply to Devan Franchini from comment #10)
> > Seems to me like it's related to this:
> > https://bugs.gentoo.org/show_bug.cgi?id=528752
> 
> Awesome, thanks for the pointer!

Not a problem. :) I've been meaning to work out the kinks on webapp-config's next release but I've been strapped for time trying to juggle other things. Hopefully over this Summer I can devote some time to giving it the treatment it deserves.
Comment 14 Leho Kraav (:macmaN @lkraav) 2015-04-23 05:08:34 UTC
I don't have dev-python/configparser but I do have =dev-python/configobj-5.0.5 which for a long time didn't receive updates from v4.

$ [-] qlop -ul configobj
Mon Oct 31 23:33:19 2011 <<< dev-python/configobj-4.7.2
Mon Oct 31 23:33:20 2011 >>> dev-python/configobj-4.7.2
Wed Aug 29 05:16:24 2012 <<< dev-python/configobj-4.7.2
Wed Aug 29 05:16:24 2012 >>> dev-python/configobj-4.7.2
Sun Dec 30 23:36:01 2012 <<< dev-python/configobj-4.7.2
Sat Feb 16 23:03:46 2013 >>> dev-python/configobj-4.7.2
Sat Aug 31 16:13:26 2013 <<< dev-python/configobj-4.7.2
Sat Aug 31 16:13:30 2013 >>> dev-python/configobj-4.7.2-r1
Tue Oct 14 00:29:08 2014 >>> dev-python/configobj-4.7.2-r2
Sat Feb  7 23:22:56 2015 <<< dev-python/configobj-4.7.2-r2
Sat Feb  7 23:22:58 2015 >>> dev-python/configobj-5.0.5
Sun Mar 22 03:35:38 2015 <<< dev-python/configobj-4.7.2-r1
Sun Mar 22 03:35:41 2015 >>> dev-python/configobj-5.0.5

Although from this log I see that I have filed the bug way earlier, so perhaps not related. This could still be something to do with some other supporting python library failing, though.
Comment 15 Leho Kraav (:macmaN @lkraav) 2015-04-24 10:02:42 UTC
Whatever is wrong here, seems to be cured by doing "app-admin/webapp-config -python_targets_python2_7"

Everything works correctly on python-3.3.5

Wfm.
Comment 16 Marcin Mirosław 2015-09-11 14:26:02 UTC
I think I've got similar problem. When I try to upgrade roundcube (USE=-vhosts) emerge finishes with message:


 * Messages for package mail-client/roundcube-1.0.6:

 * Cannot find file /.webapp

 * Messages for package mail-client/roundcube-1.0.6:


in result instalation in /var/www/localhost/roundcube isn't upgraded to 1.0.6.
I tried compile webapp-conifg without python2.7 support - still doesn't work. 

# grep -v "^#" /etc/vhosts/webapp-config |grep -v "^$"
vhost_root="/var/www/${vhost_hostname}"
vhost_hostname="localhost"
vhost_server="nginx"
vhost_config_default_dirs="default-owned"
vhost_config_virtual_files="virtual"
vhost_config_dir="${vhost_root}/conf"
vhost_default_uid="root"
vhost_default_gid="root"
vhost_htdocs_insecure="htdocs"
vhost_htdocs_secure="htdocs-secure"
vhost_perms_serverowned_dir="0775"
vhost_perms_serverowned_file="0664"
vhost_perms_configowned_dir="0755"
vhost_perms_configowned_file="0644"
vhost_perms_defaultowned_dir="0755"
vhost_perms_virtualowned_file="o-w"
vhost_perms_installdir="0755"
allow_absolute="no"
package_manager="portage"
WA_CONF_VERSION="7"
Comment 17 Sebastian Pipping gentoo-dev 2015-09-12 21:22:35 UTC
(In reply to Marcin Mirosław from comment #16)
> I think I've got similar problem. When I try to upgrade roundcube
> (USE=-vhosts) emerge finishes with message:[..]

While that looks related, roundcube is a different package.
Please

 * check if it's related to https://bugs.gentoo.org/show_bug.cgi?id=524192

 * else open a new bug including

   * version of webapp-config

   * output of "webapp-config --query roundcube-1.0.6"

Thanks!