summaryrefslogtreecommitdiffstats
path: root/documentation/overview-manual
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2018-01-12 11:47:46 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-14 15:25:28 +0000
commite4948134a853dd3183f4a13386b72891ddde2300 (patch)
tree75955f4778c518e44ea5082a255aea9ad5165b2e /documentation/overview-manual
parent9b4575b508f5c73734b5beef216292e50c7970de (diff)
downloadpoky-e4948134a853dd3183f4a13386b72891ddde2300.tar.gz
overview-manual: Updated "Fakeroot and Pseudo" section
I added a bit more detail and some better referencing for Pseudo and Fakeroot. (From yocto-docs rev: 459ba368cce50cca1c3b9b7f13b1ec59a7d933ad) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/overview-manual')
-rw-r--r--documentation/overview-manual/overview-concepts.xml54
1 files changed, 31 insertions, 23 deletions
diff --git a/documentation/overview-manual/overview-concepts.xml b/documentation/overview-manual/overview-concepts.xml
index 2f5c14eef6..6f9a366d5d 100644
--- a/documentation/overview-manual/overview-concepts.xml
+++ b/documentation/overview-manual/overview-concepts.xml
@@ -1258,11 +1258,15 @@
1258 1258
1259 <para> 1259 <para>
1260 Some tasks are easier to implement when allowed to perform certain 1260 Some tasks are easier to implement when allowed to perform certain
1261 operations that are normally reserved for the root user. 1261 operations that are normally reserved for the root user (e.g.
1262 For example, the 1262 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>,
1263 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink> 1263 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb'><filename>do_package_write*</filename></ulink>,
1264 task benefits from being able to set the UID and GID of installed 1264 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-rootfs'><filename>do_rootfs</filename></ulink>,
1265 files to arbitrary values. 1265 and
1266 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-image'><filename>do_image*</filename></ulink>).
1267 For example, the <filename>do_install</filename> task benefits
1268 from being able to set the UID and GID of installed files to
1269 arbitrary values.
1266 </para> 1270 </para>
1267 1271
1268 <para> 1272 <para>
@@ -1281,32 +1285,34 @@
1281 1285
1282 <para> 1286 <para>
1283 The capability to run tasks in a fake root environment is known as 1287 The capability to run tasks in a fake root environment is known as
1284 "fakeroot", which is derived from the BitBake keyword/variable 1288 "<ulink url='http://man.he.net/man1/fakeroot'>fakeroot</ulink>",
1289 which is derived from the BitBake keyword/variable
1285 flag that requests a fake root environment for a task. 1290 flag that requests a fake root environment for a task.
1286 In current versions of the OpenEmbedded build system,
1287 the program that implements fakeroot is known as Pseudo.
1288 </para> 1291 </para>
1289 1292
1290 <para> 1293 <para>
1291 Pseudo overrides system calls through the 1294 In the OpenEmbedded build system, the program that implements
1292 <filename>LD_PRELOAD</filename> mechanism to give the 1295 fakeroot is known as Pseudo.
1293 illusion of running as root. 1296 Pseudo overrides system calls by using the environment variable
1297 <filename>LD_PRELOAD</filename>, which results in the illusion
1298 of running as root.
1294 To keep track of "fake" file ownership and permissions resulting 1299 To keep track of "fake" file ownership and permissions resulting
1295 from operations that require root permissions, an sqlite3 1300 from operations that require root permissions, Pseudo uses
1296 database is used. 1301 an SQLite 3 database.
1297 This database is stored in 1302 This database is stored in
1298 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/pseudo/files.db</filename> 1303 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/pseudo/files.db</filename>
1299 for individual recipes. 1304 for individual recipes.
1300 Storing the database in a file as opposed to in memory 1305 Storing the database in a file as opposed to in memory
1301 gives persistence between tasks, and even between builds. 1306 gives persistence between tasks and builds, which is not
1307 accomplished using fakeroot.
1302 <note><title>Caution</title> 1308 <note><title>Caution</title>
1303 If you add your own task that manipulates the same files or 1309 If you add your own task that manipulates the same files or
1304 directories as a fakeroot task, then that task should also run 1310 directories as a fakeroot task, then that task also needs to
1305 under fakeroot. 1311 run under fakeroot.
1306 Otherwise, the task will not be able to run root-only 1312 Otherwise, the task cannot run root-only operations, and
1307 operations, and will not see the fake file ownership and 1313 cannot see the fake file ownership and permissions set by the
1308 permissions set by the other task. 1314 other task.
1309 You should also add a dependency on 1315 You need to also add a dependency on
1310 <filename>virtual/fakeroot-native:do_populate_sysroot</filename>, 1316 <filename>virtual/fakeroot-native:do_populate_sysroot</filename>,
1311 giving the following: 1317 giving the following:
1312 <literallayout class='monospaced'> 1318 <literallayout class='monospaced'>
@@ -1319,9 +1325,11 @@
1319 For more information, see the 1325 For more information, see the
1320 <ulink url='&YOCTO_DOCS_BB_URL;#var-FAKEROOT'><filename>FAKEROOT*</filename></ulink> 1326 <ulink url='&YOCTO_DOCS_BB_URL;#var-FAKEROOT'><filename>FAKEROOT*</filename></ulink>
1321 variables in the BitBake User Manual. 1327 variables in the BitBake User Manual.
1322 You can also reference this 1328 You can also reference the
1323 <ulink url='http://www.ibm.com/developerworks/opensource/library/os-aapseudo1/index.html'>Pseudo</ulink> 1329 "<ulink url='http://www.ibm.com/developerworks/opensource/library/os-aapseudo1/index.html'>Pseudo</ulink>"
1324 article. 1330 and
1331 "<ulink url='https://github.com/wrpseudo/pseudo/wiki/WhyNotFakeroot'>Why Not Fakeroot?</ulink>"
1332 articles for background information on Pseudo.
1325 </para> 1333 </para>
1326 </section> 1334 </section>
1327 1335