adduser in destroot

Bradley Giesbrecht pixilla at macports.org
Fri Mar 2 10:58:02 PST 2012


On Feb 1, 2012, at 12:17 AM, Joshua Root wrote:
Subject: adduser in destroot

> On 2012-2-1 14:28 , Dan Ports wrote:
>> I see that quite a few ports call adduser and addgroup in the destroot
>> phase. Isn't this going to fail if we're installing from a binary (and
>> skip destroot)?
> 
> Yes. Ports that do this should be changed to use the add_users option
> instead.


On Jul 28, 2011, at 5:50 PM, Joshua Root wrote:
Subject: New features in 2.0.0

> 3. add_users - setting this option like this:
> 
> add_users user1 group=group1 home=${prefix}/var/user1 user2 group=group2
> 
> will check that users 'user1' and 'user2' exist, and if not, create them
> with the specified attributes, both at build time and install time. This
> is important when ports may be installed from archives. Available
> attributes are the same as for adduser, see 'man portfile'. Direct use
> of adduser should be replaced with this option whenever possible.


Is there a reason to not have add_users moved from the install phase to the activate phase?

To test converting from adduser to add_users I used port to deactivate zope, used dscl to rm a user record and then used port to activate zope which ended with this error:
...
Error: Target org.macports.activate returned: xinstall: Unknown user zope
...

Using port to uninstall and reinstall works, just wondering.

Regards,
Bradley Giesbrecht (pixilla)



More information about the macports-dev mailing list