1 |
Hi, |
2 |
|
3 |
Recently I was experimenting with installing prefix on a SLC6.6 system |
4 |
with the home directory on AFS (Andrew File System). |
5 |
|
6 |
Things went smoothly until I got to bootstrapping stage3, more |
7 |
specifically at |
8 |
|
9 |
USE="-git" emerge -u system |
10 |
|
11 |
I started seeing the following errors (ofcourse ${EPREFIX} was the correct |
12 |
path): |
13 |
|
14 |
!!! Directory initialization failed: '${EPREFIX}/gentoo/var/lib/portage' |
15 |
!!! chmod('${EPREFIX}/gentoo/var/lib/portage', 0o2755) |
16 |
!!! Problem with sandbox binary. Disabling... |
17 |
|
18 |
Calculating dependencies |
19 |
* IMPORTANT: 10 news items need reading for repository 'gentoo_prefix'. |
20 |
* Use eselect news read to view new items. |
21 |
|
22 |
... done! |
23 |
Permission denied: 'chmod('${EPREFIX}/gentoo/var/lib/portage', 0o2755)' |
24 |
|
25 |
which showed up during any attempt at running emerge. Turns out either the fs or |
26 |
administrator does not allow me to set the setgid bit. Fixing this requires |
27 |
patching portage to not set `setgid` on set files, patch below. I have yet to |
28 |
see any adverse effects of this change. Portage doesn't seem to provide an |
29 |
epatch_user hook so I applied this change manually. |
30 |
|
31 |
An additional thing I noticed is that since AFS doesn't allow the creation of |
32 |
fifo pipes, portage fails at calls to `os.mkfifo` inside `_init_ipc_fifos`. |
33 |
I had to place PORTAGE_TMPDIR onto a local filesystem - e.g /dev/shm (if it |
34 |
isn't mounted with noexec). Probably would've bit me sooner but I did this |
35 |
preemptively before bootstrapping in the hopes of speeding up the process. |
36 |
|
37 |
After these changes, the prefix worked solidly as always. |
38 |
Hope these notes turn out to be useful to someone. |
39 |
|
40 |
Jeremi |
41 |
|
42 |
--- |
43 |
diff --git a/usr/lib/portage/pym/portage/_sets/files.py b/usr/lib/portage/pym/portage/_sets/files.py |
44 |
index e045701..f0c3c1f 100644 |
45 |
--- a/usr/lib/portage/pym/portage/_sets/files.py |
46 |
+++ b/usr/lib/portage/pym/portage/_sets/files.py |
47 |
@@ -287,7 +287,7 @@ class WorldSelectedPackagesSet(EditablePackageSet): |
48 |
self._setAtoms(atoms) |
49 |
|
50 |
def _ensure_dirs(self): |
51 |
- ensure_dirs(os.path.dirname(self._filename), gid=portage_gid, mode=0o2750, mask=0o2) |
52 |
+ ensure_dirs(os.path.dirname(self._filename), gid=portage_gid, mode=0o750, mask=0o2) |
53 |
|
54 |
def lock(self): |
55 |
if self._lock is not None: |