Opened 12 days ago

Last modified 2 hours ago

#19775 assigned enhancement

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 (3)

comment:1 by thomas, 8 days 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, 8 days 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, 2 hours ago

Owner: changed from blfs-book to Douglas R. Reno
Status: newassigned
Note: See TracTickets for help on using tickets.