Skip to content

Commit

Permalink
fix(x11/firefox): fix Segmentation fault in the command "firefox -hea…
Browse files Browse the repository at this point in the history
…dless"

Fixes #22286

Bypasses the unstable codepath by disabling
`MOZ_HAS_REMOTE`, which does not seem to negatively affect the
existing X11 behavior, only fixes the command `firefox -headless`; I
am not 100% sure that someone else does not need that feature, but
disabling it fixes `firefox -headless` and does not seem to break
anything obvious that I have noticed from browsing with the X11 mode
for a few minutes
  • Loading branch information
robertkirkman committed Nov 17, 2024
1 parent 7ab7f49 commit fd9d377
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions x11-packages/firefox/0028-fix-headless-mode.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Fixes a crash in the command "firefox -headless",
as described here https://github.com/termux/termux-packages/issues/22286
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -2714,8 +2714,8 @@ def has_remote(toolkit):
return True


-set_config("MOZ_HAS_REMOTE", has_remote)
-set_define("MOZ_HAS_REMOTE", has_remote)
+#set_config("MOZ_HAS_REMOTE", has_remote)
+#set_define("MOZ_HAS_REMOTE", has_remote)

# RLBox Library Sandboxing wasm support
# ==============================================================
2 changes: 1 addition & 1 deletion x11-packages/firefox/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Mozilla Firefox web browser"
TERMUX_PKG_LICENSE="MPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="131.0.3"
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://archive.mozilla.org/pub/firefox/releases/${TERMUX_PKG_VERSION}/source/firefox-${TERMUX_PKG_VERSION}.source.tar.xz
TERMUX_PKG_SHA256=7a7df3f97737453efaa243ca9dbaf95d0f0f833c5dc8afacb5704ee16ef060d0
# ffmpeg and pulseaudio are dependencies through dlopen(3):
Expand Down

0 comments on commit fd9d377

Please sign in to comment.