[95045] trunk/dports/java/tomcat6/Portfile
Blair Zajac
blair at orcaware.com
Sun Jul 15 13:13:59 PDT 2012
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?
>
>>> 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".
Done, I used {Web Server} instead though, liking that style better than \.
Blair
More information about the macports-dev
mailing list