[90623] trunk/dports/sysutils/boxbackup/Portfile

Eric Cronin ecronin at macports.org
Fri Mar 9 20:51:11 PST 2012


> -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...

* (ignoring for the moment that this is within a variant and thus wouldn't be packaged by the buildbot at the moment)

Thanks,
Eric


More information about the macports-dev mailing list