glfs/xincludes/mozshm.xml
Xi Ruoyao 96e0c17161
mozilla: Drop SHELL=/bin/bash
Note that if you build something relying on $SHELL, it may still fail to
build in chroot.

In the chroot we first use "env -i" to clean the environment variables.
When bash starts with no $SHELL set, it *sets* SHELL=(the login shell
of current user specified in /etc/passwd), but it *does not export this
variable*.

For example:

    $ cat > t.c << EOF
    #include <stdio.h>
    #include <stdlib.h>
    int main() { puts (getenv ("SHELL") ?: "(nullptr)"); }
    $ ./a.out
    /bin/zsh/
    $ cc t.c
    $ env -i bash -c "echo $SHELL"
    /bin/zsh
    $ env -i bash -c "./a.out"
    (nullptr)

We can remove this now only because Mozilla has added a workaround into
their building system at
https://hg.mozilla.org/mozilla-central/rev/5afe7b911f61 for some Mac
builder, inadvertently fixing our issue.

Link: https://lists.linuxfromscratch.org/sympa/arc/blfs-support/2014-11/msg00050.html
Link: https://lists.linuxfromscratch.org/sympa/arc/blfs-dev/2023-11/msg00136.html
2023-11-20 07:01:36 +08:00

27 lines
1.1 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE note PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;]>
<!-- to go inside a NOTE on mozilla packages which need shm
mounted when configured or similar in chroot.
Unfortunately, the DTD says an xinclude can only include
one paragraph.
We now have exactly one paragraph, git blame this line for
details. -->
<para>
If you are compiling this package in chroot you must
ensure that <filename>/dev/shm</filename> is mounted. If you do not
do this, the <application>Python</application> configuration will fail
with a traceback report referencing
<filename>/usr/lib/pythonN.N/multiprocessing/synchronize.py</filename>.
As the &root; user, run:
<screen role="nodump"><userinput>mountpoint -q /dev/shm || mount -t tmpfs devshm /dev/shm</userinput></screen>
</para>