aboutsummaryrefslogtreecommitdiffstats
path: root/usermanual/reference
diff options
context:
space:
mode:
Diffstat (limited to 'usermanual/reference')
-rw-r--r--usermanual/reference/fakeroot.xml48
1 files changed, 24 insertions, 24 deletions
diff --git a/usermanual/reference/fakeroot.xml b/usermanual/reference/fakeroot.xml
index 4b5e2c6c31..4be5f2ba57 100644
--- a/usermanual/reference/fakeroot.xml
+++ b/usermanual/reference/fakeroot.xml
@@ -5,10 +5,10 @@
<para>The fakeroot program is designed to allow non-root users to perform
actions that normally require root as part of the package generation
process. It is used by <xref linkend="rootfs_ipkg_class" /> the for root
- filesystem creation and by <xref linkend="image_ipkg_class" /> the for image
- creation. Some recipies also use fakeroot to assist with parts of the
- package installation (usually) or building that requires root
- priviliges.</para>
+ filesystem creation and by <xref linkend="image_ipkg_class" /> for the
+ creation of filesystem images. Some recipes also use fakeroot to assist with
+ parts of the package installation (usually) or building that requires root
+ privileges.</para>
<para>In particular fakeroot deals with:</para>
@@ -28,23 +28,23 @@
<para>First of all we'll look at an example of how the fakeroot process
works when used manually.</para>
- <para>If we attempt to create a device node as a normal (non-root) user
+ <para>If we attempt to create a device node as a normal, non-root, user
the command will fail, telling is that we do not have permission to create
device nodes:<screen>~%&gt; mknod hdc b 22 0
mknod: `hdc': Operation not permitted</screen>Yet the <xref
linkend="image_ipkg_class" /> is able to create device nodes and include
- them in the final images, qll without the need to have root
- priviliges.</para>
+ them in the final images, all without the need to have root
+ privileges.</para>
<para>Let's try and create that node again, this time we'll run the
commands from within the fakeroot process:<screen>~%&gt; ./tmp/staging/x86_64-linux/bin/fakeroot
~#&gt; mknod hdc b 22 0
~#&gt; ls -l hdc
brw------- 1 root root 22, 0 Aug 18 13:20 hdc
-~#&gt;</screen>So it looks like we have succesfully managed to create a device
- node, even though we did not have to give a password for the root user. In
- reality this device node still doesn't exist, it just looks like it
- exists. Fakeroot is lying to the shell process and telling it that
+~#&gt;</screen>So it looks like we have successfully managed to create a
+ device node, even though we did not have to give a password for the root
+ user. In reality this device node still doesn't exist, it just looks like
+ it exits. Fakeroot is lying to the shell process and telling it that
<emphasis>"yes, this file exists and these are it's
properties"</emphasis>. We'll talk more about how fakeroot actually works
in a minute.</para>
@@ -69,10 +69,11 @@ brw------- 1 user user 22, 0 Aug 18 13:20 hdc
the current user!</para>
<para>So what exactly is fakeroot doing? It's using
- <command>LD_PRELOAD</command> to load a shared libary into program which
+ <command>LD_PRELOAD</command> to load a shared library into program which
replaces calls into libc, such as open and stat, and then returns
- information to make it look like certain commands without actually
- performing them. So when creating a device node fakeroot will:</para>
+ information to make it look like certain commands succeeded without
+ actually performing them. So when creating a device node fakeroot
+ will:</para>
<orderedlist>
<listitem>
@@ -82,19 +83,19 @@ brw------- 1 user user 22, 0 Aug 18 13:20 hdc
</listitem>
<listitem>
- <para>It rembers the fact that mknod was called by root and the
- properties of the device node;</para>
+ <para>It remembers the fact that mknod was called by root and it
+ remembers the properties of the device node;</para>
</listitem>
<listitem>
<para>When a program, such as ls, calls stat on the file fakeroot
- remebers that it was device node, owned by root, and modifies that
+ remembers that it was device node, owned by root, and modifies that
stat information to return this to ls. So ls sees a device node even
though one doesn't exist.</para>
</listitem>
</orderedlist>
- <para>When we tried to run mount we recieved the error <command>"ERROR:
+ <para>When we tried to run mount we received the error <command>"ERROR:
ld.so: object 'libfakeroot.so.0' from LD_PRELOAD cannot be preloaded:
ignored."</command>. This is due to the fact that mount is an suid root
binary, and for security reasons <command>LD_PRELOAD</command> is disabled
@@ -124,14 +125,13 @@ brw------- 1 user user 22, 0 Aug 18 13:20 hdc
<para>Any static binaries will not interact with fakeroot;</para>
</listitem>
</orderedlist>
-
</section>
<section>
<title>Root filesystem, images and fakeroot</title>
- <para>Many people have been been confused by the generated root filesystem
- not containing and valid device nodes. But this is the expected
+ <para>Many people have been confused by the generated root filesystem not
+ containing and valid device nodes. But this is the expected
behaviour.</para>
<para>When you look at a generated root filesystem you'll notice that the
@@ -142,7 +142,7 @@ brw------- 1 user user 22, 0 Aug 18 13:20 hdc
~%&gt;</screen>These are empty files and not device nodes at all.</para>
<para>If we look in the image files generated from that root filesystem
- everthing is actually ok:<screen>~%&gt; tar -ztvf tmp/deploy/images/titan-titan-20060816030639.rootfs.tar.gz | grep " ./dev/ttySC"
+ everything is actually ok:<screen>~%&gt; tar -ztvf tmp/deploy/images/titan-titan-20060816030639.rootfs.tar.gz | grep " ./dev/ttySC"
crw-r----- root/root 204,8 2006-08-16 13:07:12 ./dev/ttySC0
crw-r----- root/root 204,9 2006-08-16 13:07:12 ./dev/ttySC1
crw-r----- root/root 204,10 2006-08-16 13:07:12 ./dev/ttySC2
@@ -152,7 +152,7 @@ crw-r----- root/root 204,10 2006-08-16 13:07:12 ./dev/ttySC2
<para><emphasis role="bold">NOTE: This means that you cannot use the root
filesystem in tmp/rootfs directly on your target device. You need to use
- the .tar.gz image and uncompress it as root in order to generate a root
+ the .tar.gz image and uncompress it, as root, in order to generate a root
filesystem which is suitable for use directly on the target (or as an NFS
root).</emphasis></para>
</section>
@@ -172,7 +172,7 @@ crw-r----- root/root 204,10 2006-08-16 13:07:12 ./dev/ttySC2
oe_runmake install DESTDIR=${D}
oe_runmake install-man DESTDIR=${D}
...</screen>can be modified to run within a fakeroot environment by
- prefings the task with fakeroot:<screen><emphasis role="bold">fakeroot</emphasis> do_install() {
+ prefixing the task with fakeroot:<screen><emphasis role="bold">fakeroot</emphasis> do_install() {
install -d ${D}${bindir} ${D}${sbindir} ${D}${mandir}/man8 \
${D}${sysconfdir}/default \
${D}${sysconfdir}/init.d \