On 2012-3-10 15:51 , Eric Cronin wrote:
>> -variant server \
>> - description {Install bbstored server} {
>> - pre-destroot {
>> - addgroup bbstored
>> - set gid [existsgroup bbstored]
>> - adduser bbstored gid=${gid} realname=BoxBackup\ Server
>> home=${prefix}/etc/boxbackup/bbstored
>> - }
>>
>> +variant server description {Install bbstored server} {
>> + add_users bbstored group=bbstored realname=BoxBackup\ Server \
>> + home=${prefix}/etc/boxbackup/bbstored
>>
>> destroot.target-append install-backup-server
>>
>> destroot.keepdirs-append ${destroot}${prefix}/etc/boxbackup/bbstored
>>
>> post-destroot {
>>
>> xinstall -o bbstored -g bbstored -d -m 0770
>> ${destroot}${prefix}/etc/boxbackup/bbstored
>>
>> }
>
> This clearly won't work right with packages(*) unless there's some hidden
> magic going on behind the scenes: the uid/gid selected for add_users at
> unarchive will likely be different than the uid/gid when built (on a
> different machine), but the file ownership is set in destroot. What is the
> proper stage to be doing this in now? Every other Portfile I see using
> add_users seems to have the same issue...
Modern tar formats include user and group names as well as ids, and the
tar command will use the former when extracting unless you specify
--numeric-owner.
- Josh
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev