Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32636 - webapp-apache breaks with FEATURES="userpriv"
Summary: webapp-apache breaks with FEATURES="userpriv"
Status: VERIFIED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
: 26808 33460 35316 35499 35820 (view as bug list)
Depends on: 16845
Blocks: 36069
  Show dependency tree
 
Reported: 2003-11-03 10:08 UTC by Marius Mauch (RETIRED)
Modified: 2003-12-18 10:58 UTC (History)
7 users (show)

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 Marius Mauch (RETIRED) gentoo-dev 2003-11-03 10:08:08 UTC
Current version of squirrelmail breaks if you use FEATURES="userpriv":

# emerge squirrelmail
Calculating dependencies ...done!
>>> emerge (1 of 1) net-mail/squirrelmail-1.4.2-r1 to /
>>> md5 src_uri ;-) squirrelmail-1.4.2.tar.bz2
 * Installing into //home/httpd/htdocs.
webapp-apache
apache2
install: cannot change permissions of `/var/tmp/portage/squirrelmail-1.4.2-r1/image//home/httpd/htdocs': Operation not permitted
touch: cannot touch `/var/tmp/portage/squirrelmail-1.4.2-r1/image///home/httpd/htdocs/.keep': Permission denied

!!! ERROR: net-mail/squirrelmail-1.4.2-r1 failed.
!!! Function keepdir, Line 252, Exitcode 1
!!! Failed to create .keep in /var/tmp/portage/squirrelmail-1.4.2-r1/image///home/httpd/htdocs

If you disable userpriv it works:

# FEATURES="-userpriv" emerge squirrelmail
Calculating dependencies ...done!
>>> emerge (1 of 1) net-mail/squirrelmail-1.4.2-r1 to /
>>> md5 src_uri ;-) squirrelmail-1.4.2.tar.bz2
 * Installing into //home/httpd/htdocs.
>>> Unpacking source...
>>> Unpacking squirrelmail-1.4.2.tar.bz2 to /var/tmp/portage/squirrelmail-1.4.2-r1/work

The error seems to be the fowners call in the webapps-apache eclass.
The ebuild and the eclass also uses the old chown syntax that isn't supported anymore in >=coreutils-5.0.91.
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2003-11-12 09:05:24 UTC
this is an error in webapp-apache
Comment 2 Martin Holzer (RETIRED) gentoo-dev 2003-11-16 12:56:55 UTC
*** Bug 33460 has been marked as a duplicate of this bug. ***
Comment 3 Jyrki Muukkonen 2003-11-19 09:24:16 UTC
This kind of thing also happens when using "emerge -pv" or "emerge -s" on packages which use webapp-apache.eclass (phpmyadmin, squirrel and many others). The function webapp-determine-htdocsdir() is called every time the ebuild is being parsed. It fails while running as normal user because it's trying to keepdir, chmod and chown. Why oh why? Is there really a point to change the permissions? And if there is, why not to do it in some other function.
Comment 4 Martin Holzer (RETIRED) gentoo-dev 2003-12-08 05:05:26 UTC
*** Bug 26808 has been marked as a duplicate of this bug. ***
Comment 5 Martin Holzer (RETIRED) gentoo-dev 2003-12-08 05:07:19 UTC
*** Bug 35316 has been marked as a duplicate of this bug. ***
Comment 6 Martin Holzer (RETIRED) gentoo-dev 2003-12-09 22:42:26 UTC
*** Bug 35499 has been marked as a duplicate of this bug. ***
Comment 7 Marius Mauch (RETIRED) gentoo-dev 2003-12-14 14:04:39 UTC
*** Bug 35820 has been marked as a duplicate of this bug. ***
Comment 8 Marius Mauch (RETIRED) gentoo-dev 2003-12-14 14:05:19 UTC
Is someone working on this ?
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-12-14 15:12:24 UTC
i will be working on it after my last assignment is completed (due midnight pacific time tonight)
Comment 10 Stuart Herbert (RETIRED) gentoo-dev 2003-12-15 11:45:01 UTC
Okay, I couldn't think of a way to do this and keep backwards-compatibility ...

Apps that use this eclass will have to call the new webapps-mkdirs at the beginning of their src_install() functions.

I'm in the process of updating all affected eclasses.

Stu
Comment 11 Stuart Herbert (RETIRED) gentoo-dev 2003-12-15 13:07:33 UTC
Here's the list of packages that I've touched as part of this fix:

* app-misc/gallery
* app-text/man2html
* dev-db/phpmyadmin
* dev-db/phppgadmin
* dev-php/groupoffice
* dev-php/egroupware
* dev-php/phpgroupware
* net-analyzer/cacti
* net-mail/squirrelmail
* net-p2p/zuul
* net-www/ids
* net-www/horde
* net-www/htdig
* net-www/phpBB
* net-www/phpmp
* net-www/horde-chora
* net-www/horde-turba
* net-www/moinmoin
* net-www/phpwebsite
* net-www/horde-imp
* net-www/mythweb
* net-www/horde-kronolith


Here's a list of packages that I haven't touched - reason why in brackets.

* dev-php/jpgraph (doesn't install into HTTPD_ROOT)
* net-analyzer/aimsniff (doesn't use webapp-apache to make HTTPD_ROOT)
* net-nds/phpldapadmin (repoman complained that the ebuilds weren't added - most strange)

And here's the script I used to confirm that I've updated all the packages in Portage:

cd /usr/portage && grep -Rl 'webapp-apache' * | xargs grep -L 'webapp-mkdirs'

Hopefully, it's ready for testing.
Stu
Comment 12 Marius Mauch (RETIRED) gentoo-dev 2003-12-15 13:18:08 UTC
testing shows that it's fixed (for squirrelmail, which is atm the only app on the list I care about).
Comment 13 Martin Holzer (RETIRED) gentoo-dev 2003-12-18 09:56:19 UTC
*** Bug 36069 has been marked as a duplicate of this bug. ***