[95045] trunk/dports/java/tomcat6/Portfile

Joshua Root jmr at macports.org
Sun Jul 15 14:09:40 PDT 2012


On 2012-7-16 06:13 , Blair Zajac wrote:
> On 7/14/12 3:06 PM, Joshua Root wrote:
>> On 2012-7-15 06:37 , Blair Zajac wrote:
>>> On 7/10/12 11:36 AM, Joshua Root wrote:
>>>>> -        adduser ${tomcatuser} gid=${gid} realname=Web Server
>>>>> +        add_users ${tomcatuser} gid=${gid} realname=Web Server
>>>>>
>>>>>            # Install Tomcat
>>>>>            ui_msg "# installing tomcat..."
>>>>
>>>> This doesn't work right. Setting add_users in the destroot phase means
>>>> that the user will not be added for anyone that does not run that
>>>> phase,
>>>> such as when installing from a binary.
>>>
>>> Which phase should I have this in?
>>
>> It needs to be set during all phases. Set it at the top level.
> 
> OK.  So this will create the user even if one runs extract, patch or
> build?  Is that wanted?

Yes, the code to add the user(s) if not present runs before extract,
unarchive and install. Some ports need their users created before the
build process runs.

You could avoid this if you really wanted to by manually creating your
users only at the specific places that your port needs them. It doesn't
seem like that big a deal though.

- Josh


More information about the macports-dev mailing list