From: "Peter A. Bigot" <pab@pabigot.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 0/2] support numeric owner/group tar image format
Date: Mon, 03 Nov 2014 09:19:38 -0600 [thread overview]
Message-ID: <54579D0A.5030206@pabigot.com> (raw)
In-Reply-To: <54579748.5000303@windriver.com>
On 11/03/2014 08:55 AM, Mark Hatle wrote:
> 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.
You're correct; both are stored per:
http://www.gnu.org/software/tar/manual/html_node/Standard.html
This should probably be publicized more widely, since when the issue
came up recently I wasn't the only one who discovered the hand-generated
images had the wrong uid/gid values for non-root files. Unnecessarily,
as it turns out: adding --numeric-owner to the unpack does solve the
problem.
Thanks. I'll archive both patches in patchwork (the first is still
valid, but is now unmotivated).
Peter
prev parent reply other threads:[~2014-11-03 15:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-02 10:48 [PATCH 0/2] support numeric owner/group tar image format Peter A. Bigot
2014-11-02 10:48 ` [PATCH 1/2] image_types.bbclass: whitespace and reorder Peter A. Bigot
2014-11-02 10:48 ` [PATCH 2/2] image_types.bbclass: add tar --numeric-owner support Peter A. Bigot
2014-11-02 15:01 ` Richard Purdie
2014-11-02 15:10 ` Peter A. Bigot
2014-11-03 14:55 ` [PATCH 0/2] support numeric owner/group tar image format Mark Hatle
2014-11-03 15:19 ` Peter A. Bigot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54579D0A.5030206@pabigot.com \
--to=pab@pabigot.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.