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

Joshua Root jmr at macports.org
Sat Jul 14 15:06:24 PDT 2012


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.

>> You should also just put 'group=${tomcatgroup}' in add_users, instead of
>> calling addgroup directly and then using the gid.
> 
> So replace:
> 
>         # Create the tomcat user
>         addgroup ${tomcatgroup}
>         set gid [existsgroup ${tomcatgroup}]
>         add_users ${tomcatuser} gid=${gid} realname=Web Server
> 
> with
>         add_users ${tomcatuser} group=${tomcatgroup} realname=Web Server

Yes. Though actually you need to backslash escape the space in "Web
Server" as well; as it stands it will set the realname for $tomcatuser
to "Web" and add a second user called "Server".

- Josh


More information about the macports-dev mailing list