[Buildroot] Buildroot "install" wrapper to preserve file permissions
Daniel Nyström
daniel.nystrom at timeterminal.se
Wed Apr 6 07:32:34 UTC 2011
Den 6 april 2011 08:59 skrev Peter Korsgaard <jacmet at uclibc.org>:
> >> How does this wrapper works ? I'd like to check if it solve my dbus
> >> issue, because I'm not sure that the dbus build system installs it with
> >> the correct ownership (permission will probably be correct, but I'm not
> >> sure about ownership).
>
> Daniel> There is none yet, but as I think of it, it just adds a line in the
> Daniel> device_table.txt with the path and permission to the installed files.
>
> Daniel> install -o 1000 -g 1000 -m 755 mybinary /usr/bin/mybinary
>
> Something like that, except it should only do so when called with a
> destination directory under $(TARGET_DIR) and only if called with -o or
> -g to set owner/group differently than root/root. As a further
> complication owner/group can be numeric or names, and names have to get
> resolved to the IDs we have in $(TARGET_DIR)/etc/{passwd,group}.
>
> Finally the -o / -g options should get stripped and the request
> forwarded to the real install program.
Thanks for elaborating!
Is there any permissions not allowed to be set by the user? If that's
the case, one could strip -m as well. That would also prevent
execution of target binaries on host system (if that's the case
nowadays? I'm on an old Buildroot version myself).
More information about the buildroot
mailing list