* [Buildroot] [PATCH] docs/manual: document BR2_ROOTFS_POST_FAKEROOT_SCRIPT
@ 2016-07-03 19:01 Yann E. MORIN
2016-07-04 13:24 ` Peter Korsgaard
0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2016-07-03 19:01 UTC (permalink / raw)
To: buildroot
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <peter@korsgaard.com>
---
docs/manual/customize-rootfs.txt | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt
index 558bd72..8d8acd2 100644
--- a/docs/manual/customize-rootfs.txt
+++ b/docs/manual/customize-rootfs.txt
@@ -61,7 +61,7 @@ In addition, you may also use these environment variables:
stored
- +BASE_DIR+: the base output directory
-Below two more methods of customizing the target filesystem are
+Below three more methods of customizing the target filesystem are
described, but they are not recommended.
Direct modification of the target filesystem::
@@ -104,4 +104,35 @@ This method is not recommended because it duplicates the entire
skeleton, which prevents taking advantage of the fixes or improvements
brought to the default skeleton in later Buildroot releases.
+Post-fakeroot scripts (+BR2_ROOTFS_POST_FAKEROOT_SCRIPT+)::
++
+When aggregating the final images, some parts of the process requires
+ root rights: creating device nodes in `/dev`, setting permissions or
+ ownership to files and directories... To avoid requiring actual root
+ rights, Buildroot uses +fakeroot+ to simulate root rights. This is not
+ a complete substitute for actually being root, but is enough for what
+ Buildroot needs.
++
+Post-fakeroot scripts are shell scripts that are called at the 'end' of
+ the fakeroot phase, 'right before' the filesystem image generator is
+ called. As such, they are called in the fakeroot context.
++
+Post-fakeroot scripts can be useful in case you need to tweak the
+ filesystem to do modifications that are usually only available to the
+ root user.
++
+.Note:
+It is recommended to use the existing mechanisms to set file permissions
+ or create entries in `/dev` (see xref:customize-device-permission[]) or
+ to create users (see xref:customize-users[])
++
+.Note:
+The difference between post-build scripts (above) and fakeroot scripts,
+ is that post-build scripts are not called in the fakeroot context.
++
+.Note;
+Using `fakeroot` is not an absolute substitute for actually being root.
+ `fakeroot` only ever fakes the file access rights and types (regular,
+ block-or-char device...) and uid/gid; these are emulated them in-memory.
+
include::customize-device-permission-tables.txt[]
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] docs/manual: document BR2_ROOTFS_POST_FAKEROOT_SCRIPT
2016-07-03 19:01 [Buildroot] [PATCH] docs/manual: document BR2_ROOTFS_POST_FAKEROOT_SCRIPT Yann E. MORIN
@ 2016-07-04 13:24 ` Peter Korsgaard
0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2016-07-04 13:24 UTC (permalink / raw)
To: buildroot
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Peter Korsgaard <peter@korsgaard.com>
> ---
> docs/manual/customize-rootfs.txt | 33 ++++++++++++++++++++++++++++++++-
> 1 file changed, 32 insertions(+), 1 deletion(-)
> diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt
> index 558bd72..8d8acd2 100644
> --- a/docs/manual/customize-rootfs.txt
> +++ b/docs/manual/customize-rootfs.txt
> @@ -61,7 +61,7 @@ In addition, you may also use these environment variables:
> stored
> - +BASE_DIR+: the base output directory
> -Below two more methods of customizing the target filesystem are
> +Below three more methods of customizing the target filesystem are
> described, but they are not recommended.
> Direct modification of the target filesystem::
> @@ -104,4 +104,35 @@ This method is not recommended because it duplicates the entire
> skeleton, which prevents taking advantage of the fixes or improvements
> brought to the default skeleton in later Buildroot releases.
> +Post-fakeroot scripts (+BR2_ROOTFS_POST_FAKEROOT_SCRIPT+)::
> ++
> +When aggregating the final images, some parts of the process requires
> + root rights: creating device nodes in `/dev`, setting permissions or
> + ownership to files and directories... To avoid requiring actual root
> + rights, Buildroot uses +fakeroot+ to simulate root rights. This is not
> + a complete substitute for actually being root, but is enough for what
> + Buildroot needs.
> ++
> +Post-fakeroot scripts are shell scripts that are called at the 'end' of
> + the fakeroot phase, 'right before' the filesystem image generator is
> + called. As such, they are called in the fakeroot context.
> ++
> +Post-fakeroot scripts can be useful in case you need to tweak the
> + filesystem to do modifications that are usually only available to the
> + root user.
> ++
> +.Note:
> +It is recommended to use the existing mechanisms to set file permissions
> + or create entries in `/dev` (see xref:customize-device-permission[]) or
> + to create users (see xref:customize-users[])
> ++
> +.Note:
> +The difference between post-build scripts (above) and fakeroot scripts,
> + is that post-build scripts are not called in the fakeroot context.
> ++
> +.Note;
> +Using `fakeroot` is not an absolute substitute for actually being root.
> + `fakeroot` only ever fakes the file access rights and types (regular,
> + block-or-char device...) and uid/gid; these are emulated them in-memory.
s/them //
Committed with that fixed thanks.
--
Venlig hilsen,
Peter Korsgaard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-04 13:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-03 19:01 [Buildroot] [PATCH] docs/manual: document BR2_ROOTFS_POST_FAKEROOT_SCRIPT Yann E. MORIN
2016-07-04 13:24 ` Peter Korsgaard
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.