Gentoo Archives: gentoo-commits

From: "Göktürk Yüksek" <gokturk@××××××××××.edu>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: appendices/common-problems/
Date: Wed, 04 May 2016 09:13:24
Message-Id: 1462352900.658d52f0eafaa6c139aa1c6ba5c249afa2e2f4e1.gokturk@gentoo
1 commit: 658d52f0eafaa6c139aa1c6ba5c249afa2e2f4e1
2 Author: Göktürk Yüksek <gokturk <AT> binghamton <DOT> edu>
3 AuthorDate: Wed May 4 08:53:44 2016 +0000
4 Commit: Göktürk Yüksek <gokturk <AT> binghamton <DOT> edu>
5 CommitDate: Wed May 4 09:08:20 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=658d52f0
7
8 appendices/common-problems: remove the misleading sandbox violation example
9
10 In the "Handling Access Violations" section, there is an example of a
11 build system causing a sandbox violation by attempting to access
12 HOME. Per PMS, HOME is a predefined read-only environment variable
13 that points to a temporary location, which doesn't cause any sandbox
14 violations. Remove the example while keeping the idea of tricking the
15 build system into using a safer location.
16
17 Signed-off-by: Göktürk Yüksek <gokturk <AT> binghamton.edu>
18
19 appendices/common-problems/text.xml | 30 +++++-------------------------
20 1 file changed, 5 insertions(+), 25 deletions(-)
21
22 diff --git a/appendices/common-problems/text.xml b/appendices/common-problems/text.xml
23 index b0a7e58..2a9a2e7 100644
24 --- a/appendices/common-problems/text.xml
25 +++ b/appendices/common-problems/text.xml
26 @@ -214,31 +214,11 @@ ebuilds.
27 </p>
28
29 <p>
30 -Access violations most commonly occur during the install phase. See
31 -<c>src_install</c> and <uri link="::general-concepts/install-destinations/"/>
32 -for discussion.
33 -</p>
34 -
35 -<p>
36 -Sometimes problems can also occur with packages attempting to write to
37 -<c>${HOME}</c>. To get around this, it is usually sufficient to trick the build
38 -system into using a safer location. For example, the <c>fluxbox</c> menu generator
39 -tries to work in <c>${HOME}/.fluxbox</c> <d/> to get around this, the following is
40 -used:
41 -</p>
42 -
43 -<codesample lang="ebuild">
44 -ebegin "Creating a menu file (may take a while)"
45 -mkdir -p "${T}/home/.fluxbox" || die "mkdir home failed"
46 -MENUFILENAME="${S}/data/menu" MENUTITLE="Fluxbox ${PV}" \
47 - CHECKINIT="no. go away." HOME="${T}/home" \
48 - "${S}"/util/fluxbox-generate_menu -is -ds \
49 - || die "menu generation failed"
50 -eend $?
51 -</codesample>
52 -
53 -<p>
54 -In this situation, providing a fake home directory is all that is needed.
55 +Access violations most commonly occur during the install
56 +phase. Sometimes it is possible to get around the sandbox violations
57 +by tricking the build system into using a safer location. See
58 +<c>src_install</c> and
59 +<uri link="::general-concepts/install-destinations/"/> for discussion.
60 </p>
61
62 </body>