]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
overview-manual, ref-manual: Moved Pseudo and Fakeroot to overview manual
authorScott Rifenbark <srifenbark@gmail.com>
Thu, 11 Jan 2018 19:17:06 +0000 (11:17 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 14 Feb 2018 15:25:28 +0000 (15:25 +0000)
Fixes [YOCTO #12370]

The "Fakeroot and Pseudo" section is concepts and needed moved from the
ref-manual to the new concepts chapter of the overview-manual.  Some
links needed to be fixed as well.

(From yocto-docs rev: df2c09407abd5ca468fcd0bd9e241739907a9d63)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
documentation/overview-manual/overview-concepts.xml
documentation/ref-manual/ref-tasks.xml
documentation/ref-manual/ref-variables.xml
documentation/ref-manual/technical-details.xml
documentation/yocto-project-qs/qs.xml

index 9fb3283feea945d8f8263df476acba34599a6609..74ce7fd52f40f82c13e38baec9f2c5f13663bae4 100644 (file)
         </para>
     </section>
 
+    <section id='fakeroot-and-pseudo'>
+        <title>Fakeroot and Pseudo</title>
+
+        <para>
+            Some tasks are easier to implement when allowed to perform certain
+            operations that are normally reserved for the root user.
+            For example, the
+            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
+            task benefits from being able to set the UID and GID of installed
+            files to arbitrary values.
+        </para>
+
+        <para>
+            One approach to allowing tasks to perform root-only operations
+            would be to require BitBake to run as root.
+            However, this method is cumbersome and has security issues.
+            The approach that is actually used is to run tasks that benefit
+            from root privileges in a "fake" root environment.
+            Within this environment, the task and its child processes believe
+            that they are running as the root user, and see an internally
+            consistent view of the filesystem.
+            As long as generating the final output (e.g. a package or an image)
+            does not require root privileges, the fact that some earlier
+            steps ran in a fake root environment does not cause problems.
+        </para>
+
+        <para>
+            The capability to run tasks in a fake root environment is known as
+            "fakeroot", which is derived from the BitBake keyword/variable
+            flag that requests a fake root environment for a task.
+            In current versions of the OpenEmbedded build system,
+            the program that implements fakeroot is known as Pseudo.
+        </para>
+
+        <para>
+            Pseudo overrides system calls through the
+            <filename>LD_PRELOAD</filename> mechanism to give the
+            illusion of running as root.
+            To keep track of "fake" file ownership and permissions resulting
+            from operations that require root permissions, an sqlite3
+            database is used.
+            This database is stored in
+            <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/pseudo/files.db</filename>
+            for individual recipes.
+            Storing the database in a file as opposed to in memory
+            gives persistence between tasks, and even between builds.
+            <note><title>Caution</title>
+                If you add your own task that manipulates the same files or
+                directories as a fakeroot task, then that task should also run
+                under fakeroot.
+                Otherwise, the task will not be able to run root-only
+                operations, and will not see the fake file ownership and
+                permissions set by the other task.
+                You should also add a dependency on
+                <filename>virtual/fakeroot-native:do_populate_sysroot</filename>,
+                giving the following:
+                <literallayout class='monospaced'>
+       fakeroot do_mytask () {
+           ...
+       }
+       do_mytask[depends] += "virtual/fakeroot-native:do_populate_sysroot"
+                </literallayout>
+            </note>
+            For more information, see the
+            <ulink url='&YOCTO_DOCS_BB_URL;#var-FAKEROOT'><filename>FAKEROOT*</filename></ulink>
+            variables in the BitBake User Manual.
+            You can also reference this
+            <ulink url='http://www.ibm.com/developerworks/opensource/library/os-aapseudo1/index.html'>Pseudo</ulink>
+            article.
+        </para>
+    </section>
+
     <section id='x32'>
         <title>x32 psABI</title>
 
index 09095958340d5bb8ced81a7c842d0846caf1d8e2..4fa64c0d602dc17790a5f64cead3debb14b4bceb 100644 (file)
             and
             <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>),
             run under
-            <link linkend='fakeroot-and-pseudo'>fakeroot</link>.
+            <ulink url='&YOCTO_DOCS_OVERVIEW_URL;#fakeroot-and-pseudo'>fakeroot</ulink>.
             <note>
                 <title>Caution</title>
 
index 67cf8859ee1073d8ee94ad4bc10cdaa6e217b4ea..a971e2a8f9cd76940d9034898c2533f977cebeeb 100644 (file)
                     <note><title>Caution</title>
                         Tasks that read from or write to this directory should
                         run under
-                        <link linkend='fakeroot-and-pseudo'>fakeroot</link>.
+                        <ulink url='&YOCTO_DOCS_OVERVIEW_URL;#fakeroot-and-pseudo'>fakeroot</ulink>.
                     </note>
                 </para>
             </glossdef>
index b30dfe8597acaa6bddf233584c4b3dafe2fd3ab1..2b4f2d933cdd29876b7f38a3d21dbcaac3c8f820 100644 (file)
         x32, Wayland support, and Licenses.
     </para>
 
-<section id='fakeroot-and-pseudo'>
-    <title>Fakeroot and Pseudo</title>
-
-    <para>
-        Some tasks are easier to implement when allowed to perform certain
-        operations that are normally reserved for the root user.
-        For example, the
-        <link linkend='ref-tasks-install'><filename>do_install</filename></link>
-        task benefits from being able to set the UID and GID of installed files
-        to arbitrary values.
-    </para>
-
-    <para>
-        One approach to allowing tasks to perform root-only operations
-        would be to require BitBake to run as root.
-        However, this method is cumbersome and has security issues.
-        The approach that is actually used is to run tasks that benefit from
-        root privileges in a "fake" root environment.
-        Within this environment, the task and its child processes believe that
-        they are running as the root user, and see an internally consistent
-        view of the filesystem.
-        As long as generating the final output (e.g. a package or an image)
-        does not require root privileges, the fact that some earlier steps ran
-        in a fake root environment does not cause problems.
-    </para>
-
-    <para>
-        The capability to run tasks in a fake root environment is known as
-        "fakeroot", which is derived from the BitBake keyword/variable
-        flag that requests a fake root environment for a task.
-        In current versions of the OpenEmbedded build system,
-        the program that implements fakeroot is known as Pseudo.
-    </para>
-
-    <para>
-        Pseudo overrides system calls through the
-        <filename>LD_PRELOAD</filename> mechanism to give the
-        illusion of running as root.
-        To keep track of "fake" file ownership and permissions resulting from
-        operations that require root permissions, an sqlite3
-        database is used.
-        This database is stored in
-        <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}/pseudo/files.db</filename>
-        for individual recipes.
-        Storing the database in a file as opposed to in memory
-        gives persistence between tasks, and even between builds.
-        <note><title>Caution</title>
-            If you add your own task that manipulates the same files or
-            directories as a fakeroot task, then that task should also run
-            under fakeroot.
-            Otherwise, the task will not be able to run root-only operations,
-            and will not see the fake file ownership and permissions set by the
-            other task.
-            You should also add a dependency on
-            <filename>virtual/fakeroot-native:do_populate_sysroot</filename>,
-            giving the following:
-            <literallayout class='monospaced'>
-       fakeroot do_mytask () {
-           ...
-       }
-       do_mytask[depends] += "virtual/fakeroot-native:do_populate_sysroot"
-            </literallayout>
-        </note>
-        For more information, see the
-        <ulink url='&YOCTO_DOCS_BB_URL;#var-FAKEROOT'><filename>FAKEROOT*</filename></ulink>
-        variables in the BitBake User Manual.
-        You can also reference this
-        <ulink url='http://www.ibm.com/developerworks/opensource/library/os-aapseudo1/index.html'>Pseudo</ulink>
-        article.
-    </para>
-</section>
-
 <section id="wayland">
     <title>Wayland</title>
 
index dda3c112eaa45af1ff0373f8cadc32a6a58efdc1..3c61b9b4990d4fb56bdf5ae0aaca0d28296df742 100644 (file)
                         I don't have much on this in the manual set.
                         Is there any more information we can leverage?
                         For information on Fakeroot and Pseudo, see the
-                        "<ulink url='&YOCTO_DOCS_REF_URL;#fakeroot-and-pseudo'>Fakeroot and Pseudo</ulink>"
-                        section in the Yocto Project Reference Manual.
+                        "<ulink url='&YOCTO_DOCS_OVERVIEW_URL;#fakeroot-and-pseudo'>Fakeroot and Pseudo</ulink>"
+                        section in the Yocto Project Overview Manual.
                         </para></listitem>
                     <listitem><para role='writernotes'>
                         <emphasis>OPKG:</emphasis>