Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] Changing permission recursively
Date: Fri, 13 Mar 2015 12:27:41 +0200	[thread overview]
Message-ID: <20150313102741.GQ2177@tarshish> (raw)
In-Reply-To: <CA+TH9V=b-5KdMKQVWkZRZDh31qkKqBTqy+6MdqU3Sr+7wuGFkA@mail.gmail.com>

Hi Thomas, Angelo,

On Fri, Mar 13, 2015 at 07:46:03AM +0100, Angelo Compagnucci wrote:
> 2015-03-13 7:31 GMT+01:00 Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com>:
> > On Thu, 12 Mar 2015 19:55:28 +0200, Baruch Siach wrote:
> >
> >> How about running the following from a post build script (untested):
> >>
> >>       ${HOST_DIR}/usr/bin/fakeroot -- chown -R UID:GID ${1}/path/to/directory
> >
> > Does this actually works ?
> >
> > My understanding of fakeroot is that you have to execute all the
> > fakeroot'ed commands under the same fakeroot invocation for the changes
> > made by these commands to actually have an effect.

Right. I forgot that.

> Fakeroot environment is not kept between invocations. You should use
> -i and -s options of fakeroot command if you want to save/restore
> permissions between invocations.
> We should provide a path for the savefile in buildroot to handle this
> scenario, but from my trials, maintaining consistent such file file is
> quite challenging.

Another options is to simply cat a user provided script into 
$(FAKEROOT_SCRIPT) as part of the rootfs image generation at fs/common.mk.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

  reply	other threads:[~2015-03-13 10:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12  9:08 [Buildroot] Changing permission recursively Angelo Compagnucci
2015-03-12 12:41 ` Matthew Weber
2015-03-12 13:53   ` Angelo Compagnucci
2015-03-12 17:55 ` Baruch Siach
2015-03-12 20:32   ` Arnout Vandecappelle
2015-03-13  6:32     ` Thomas Petazzoni
2015-03-13  6:40       ` Angelo Compagnucci
2015-03-13  6:31   ` Thomas Petazzoni
2015-03-13  6:46     ` Angelo Compagnucci
2015-03-13 10:27       ` Baruch Siach [this message]
2015-03-13 10:53         ` Thomas Petazzoni
2015-03-13 10:59           ` Angelo Compagnucci

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=20150313102741.GQ2177@tarshish \
    --to=baruch@tkos.co.il \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox