This code in the ebuild ... : cp -r . ${D}/${HTTPD_ROOT}/${PN} cd ${D}/${HTTPD_ROOT} chown -R ${HTTPD_USER}.${HTTPD_GROUP} ${PN}/data ...produces access denied errors because of the sandbox. Shouldn't them be substituted by the portage equivalents (doins, etc...)? Besides this : In a previous bug I filled some time ago (phpmyadmin that time, bug 20642), some developers put clear that ebuilds shouldn't seek for the documentroot in the apache config files, but have /home/httpd/htdocs hardcoded. Also, the code to detect the user that apache uses differs from that in the apache ebuild, that is to seek for the "apache" user and group in the system files. As I spotted in the other bug report, not everybody is willing to use a separate file por vhosts. So it HAPPENS that some of us have more than one line begining with DocumentRoot. Has anyone tried what happens with the ebuild in this conditions? With phpmyadmin, it trashed the documentroot of my last virtualhost (yes, the root, not the phpmyadmin subdir). Shouldn't it be of utility to write a howto for correctly creating webapp ebuilds? How to make the checks, etc... I don't know too much about writting ebuilds, although I suppose I could spend some time learning about it, but yet the veterans could write a more detailed and accurate guide. Is this something to start a phorum thread for? I propose to add this settings to /etc/conf.d/apache, so all ebuilds could go there to seek for this data or, as the developers stated, just use an universal predefined builtin setting. I've added the developers that discussed in the other bug report to this one, as the same problem could arise. I may thank god for the access violation error.
Proposed patch : 16,21c16,18 < HTTPD_ROOT="`grep '^DocumentRoot' /etc/apache/conf/apache.conf | cut -d\ -f2`" < HTTPD_USER="`grep '^User' /etc/apache/conf/commonapache.conf | cut -d \ -f2`" < HTTPD_GROUP="`grep '^Group' /etc/apache/conf/commonapache.conf | cut -d \ -f2`" < [ -z "${HTTPD_ROOT}" ] && HTTPD_ROOT="/home/httpd/htdocs" < [ -z "${HTTPD_USER}" ] && HTTPD_USER="apache" < [ -z "${HTTPD_GROUP}" ] && HTTPD_GROUP="apache" --- > HTTPD_ROOT="/home/httpd/htdocs" > HTTPD_USER="apache" > HTTPD_GROUP="apache" Also, another question : is there any reason for forcing the user to uninstall previous versions before upgrading?
The DocumentRoot stuff is the subject of a discussion on the gentoo-dev mailing list presently.
fixed