[OE-core] [PATCH 0/2] support numeric owner/group tar image format

Mark Hatle mark.hatle at windriver.com
Mon Nov 3 14:55:04 UTC 2014


On 11/2/14, 4:48 AM, Peter A. Bigot wrote:
> A classic approach to building SD card images with varying rootfs sizes
> is to create the filesystem and unpack a tar rootfs image onto it.  When
> done outside pseudo the encoded user and group names from the tar file
> are converted to identifiers using host files, which often result in
> incorrect assignment for common names like messagebus and ntp.
>
> A solution is to create the rootfs archive using the numeric values
> obtained from the target /etc files under pseudo, rather than the
> corresponding names.  This series provides this function as a new image
> file format "nug.tar".
>
> Peter A. Bigot (2):
>    image_types.bbclass: whitespace and reorder
>    image_types.bbclass: add tar --numeric-owner support
>
>   meta/classes/image_types.bbclass | 18 +++++++++++++++++-
>   1 file changed, 17 insertions(+), 1 deletion(-)
>

I think this is incorrect.

The current tar archives contain both the uname/gname -and- uid/gid.  When you 
extract, if you pass --numeric-owner it will switch from name to number.  (At 
least it has whenever I've done it.)  The default though is to use the uname/gname.

The issue with switching to uid/gid is that you can end up changing the default 
and you may enough end up dumping the name version.  This can cause security 
issues if you do partial extracts and there was some type of a mismatch between 
the original system and the one being extracted.  (Think field 
upgrade/debug/update cycle.)

--Mark



More information about the Openembedded-core mailing list