Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 372479 - net-nds/openldap-2.4.21 ebuild should protect enewgroup and enewuser with `use prefix ||`
Summary: net-nds/openldap-2.4.21 ebuild should protect enewgroup and enewuser with `us...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-21 13:42 UTC by W. Trevor King
Modified: 2011-06-22 16:48 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 W. Trevor King 2011-06-21 13:42:41 UTC
There are several sections in the openldap-2.4.21 that are disabled when the `prefix` USE flag is set.  For example:

    use prefix || chown ldap:ldap "${EROOT}"var/run/openldap

However, the group and user creation are not protected, which leads to the following warnings while emerging:

     * 'enewgroup()' disabled in Prefixed Portage with non root user
     * 'enewuser()' disabled in Prefixed Portage with non root user

I've put a patched version of the ebuild in my prefix overlay [1].

[1] http://www.physics.drexel.edu/~wking/code/git/gitweb.cgi?p=wtk-prefix-overlay.git;a=blob;f=net-nds/openldap/openldap-2.4.21.ebuild;h=b68a0402a27c02a1ded74bca3a02aeab5130de79;hb=1da33e6c93ac734106a10ace79a23a1ef37f5063

Reproducible: Always

Steps to Reproduce:
1. emerge -pv openldap
Actual Results:  
...
 * 'enewgroup()' disabled in Prefixed Portage with non root user
 * 'enewuser()' disabled in Prefixed Portage with non root user
...

Expected Results:  
Successful install.
Comment 1 Fabian Groffen gentoo-dev 2011-06-21 13:45:27 UTC
what's wrong with seeing the warning?
Comment 2 W. Trevor King 2011-06-21 14:40:26 UTC
(In reply to comment #1)
> what's wrong with seeing the warning?

The new group/user aren't used anywhere in the ebuild (if the `prefix` use flag is set), so the ebuild should not be trying to create them.  In a hypothetical system where you could create new users and groups without super user powers, the current ebuild would do so and then never use them, which makes no sense.  Either commit to creating the user/group and using it, or give up on it entirely.
Comment 3 Fabian Groffen gentoo-dev 2011-06-21 15:07:27 UTC
ok, I share your ideals, but the fact that enewuser and enewgroup already figure out themselves whether or not creating a user is possible, is sort of preparation for the day root-based prefix installs /do/ work.  use prefix is simply wrong here, but we don't have something like use privileges.
Comment 4 W. Trevor King 2011-06-21 15:41:29 UTC
OK, I'm fine with a `wontfix` then.
Comment 5 Fabian Groffen gentoo-dev 2011-06-22 16:48:57 UTC
ok, wontfixing