Opened 3 weeks ago

Closed 4 days ago

#19775 closed enhancement (fixed)

Mozilla: Make ac_add_options --disable-sandbox automatic?

Reported by: Xi Ruoyao Owned by: Douglas R. Reno
Priority: normal Milestone: 12.2
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

In the book we are saying:

# Sandboxing works well on x86_64 but might cause issues on other
# platforms. If not on x86_64, e.g. i686, it is recommended to
# uncomment the following switch.
#ac_add_options --disable-sandbox

And when I was analyzing lfs:#5487 it seemed on a 32-bit x86 with LFS Glibc configuration the sandbox will definitely blow up (due to the use of statx for stat-family functions to avoid y2038 issue, and --enable-kernel=4.19 which disables falling back to y2038-unsafe alternatives).

Maybe we can make it automatic, like

[ $(uname -m) != x86_64 ] && ac_add_options --disable-sandbox

?

Change History (4)

comment:1 by thomas, 3 weeks ago

I use the following sed in my script which let me use the mozconfig as provided in the book - just patching it after creating it via cat > mozconfig <<EOF...

if [ "$(uname -m)" == "i686" ]; then
    sed -e "/#ac_add_options --disable-sandbox/s/#//" -i mozconfig
fi

comment:2 by Xi Ruoyao, 3 weeks ago

To me mozconfig is interpreted as a shell script and we can wire the logic directly into it instead of fixing it up.

comment:3 by Douglas R. Reno, 12 days ago

Owner: changed from blfs-book to Douglas R. Reno
Status: newassigned

comment:4 by Douglas R. Reno, 4 days ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.