[UPD] note why /dev/shm must exist before python is built
This commit is contained in:
parent
fe9c58c1a3
commit
f875649c96
1 changed files with 17 additions and 0 deletions
|
|
@ -540,6 +540,23 @@ mount_chroot() {
|
||||||
# A tmpfs of its own rather than a bind: nothing here shares semaphores with
|
# A tmpfs of its own rather than a bind: nothing here shares semaphores with
|
||||||
# anything outside the chroot. Mode 1777 because unprivileged builds write
|
# anything outside the chroot. Mode 1777 because unprivileged builds write
|
||||||
# into it.
|
# into it.
|
||||||
|
#
|
||||||
|
# AND IT MUST BE HERE BEFORE PYTHON IS BUILT. Mounting it later does not
|
||||||
|
# help: CPython's configure runs sem_open at BUILD time, and with no /dev/shm
|
||||||
|
# it concluded the platform has no working semaphores --
|
||||||
|
#
|
||||||
|
# POSIX_SEMAPHORES_NOT_ENABLED: 1 (in _sysconfigdata__*.py)
|
||||||
|
# HAVE_SEM_OPEN: 1 (the function exists)
|
||||||
|
#
|
||||||
|
# -- and compiled _multiprocessing without SemLock. Any package that imports
|
||||||
|
# multiprocessing then fails permanently, with a message blaming the
|
||||||
|
# platform:
|
||||||
|
#
|
||||||
|
# ImportError: This platform lacks a functioning sem_open implementation.
|
||||||
|
#
|
||||||
|
# nss is the one that found it. A python built in a chroot without this mount
|
||||||
|
# stays broken however many times the consumer is retried; the fix is to
|
||||||
|
# rebuild python, which is why this comment says so.
|
||||||
mountpoint -q "$ROOT/dev/shm" ||
|
mountpoint -q "$ROOT/dev/shm" ||
|
||||||
sudo mount -t tmpfs -o mode=1777,nosuid,nodev tmpfs "$ROOT/dev/shm"
|
sudo mount -t tmpfs -o mode=1777,nosuid,nodev tmpfs "$ROOT/dev/shm"
|
||||||
# Sources and PKGBUILDs, already fetched by stage 1. Bind-mounting them
|
# Sources and PKGBUILDs, already fetched by stage 1. Bind-mounting them
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue