update to 91.0 [release 91.0-1mamba;Tue Aug 17 2021]

This commit is contained in:
Silvan Calarco 2024-01-05 22:19:14 +01:00
parent c73c053976
commit 70c4d3126e
3 changed files with 137 additions and 3 deletions

View File

@ -0,0 +1,77 @@
Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Date: 2021-08-09
Initial Package Version: 91.0, 91.0esr
Upstream Status: Unknown
Origin: fedora
Description: Allows firefox to build with glibc-2.34, avoiding:
firefox-91.0/js/xpconnect/src/XPCJSContext.cpp: At global scope:
firefox-91.0/js/xpconnect/src/XPCJSContext.cpp:95:5: error: call to non-'constexpr' function 'long int __sysconf(int)'
13:24.55 95 | PTHREAD_STACK_MIN < 32 * 1024 ? 32 * 1024 : PTHREAD_STACK_MIN;
13:24.55 | ^~~~~~~~~~~~~~~~~
diff -ur firefox-90.0.orig/js/xpconnect/src/XPCJSContext.cpp firefox-90.0/js/xpconnect/src/XPCJSContext.cpp
--- firefox-90.0.orig/js/xpconnect/src/XPCJSContext.cpp 2021-07-05 21:16:02.000000000 +0200
+++ firefox-90.0/js/xpconnect/src/XPCJSContext.cpp 2021-07-19 15:01:24.083460460 +0200
@@ -85,14 +85,6 @@
using namespace xpc;
using namespace JS;
-// The watchdog thread loop is pretty trivial, and should not require much stack
-// space to do its job. So only give it 32KiB or the platform minimum.
-#if !defined(PTHREAD_STACK_MIN)
-# define PTHREAD_STACK_MIN 0
-#endif
-static constexpr size_t kWatchdogStackSize =
- PTHREAD_STACK_MIN < 32 * 1024 ? 32 * 1024 : PTHREAD_STACK_MIN;
-
static void WatchdogMain(void* arg);
class Watchdog;
class WatchdogManager;
@@ -163,7 +155,7 @@
// watchdog, we need to join it on shutdown.
mThread = PR_CreateThread(PR_USER_THREAD, WatchdogMain, this,
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
- PR_JOINABLE_THREAD, kWatchdogStackSize);
+ PR_JOINABLE_THREAD, 0);
if (!mThread) {
MOZ_CRASH("PR_CreateThread failed!");
}
Only in firefox-90.0/js/xpconnect/src: XPCJSContext.cpp.firefox-glibc-dynstack
diff -ur firefox-90.0.orig/security/sandbox/linux/launch/SandboxLaunch.cpp firefox-90.0/security/sandbox/linux/launch/SandboxLaunch.cpp
--- firefox-90.0.orig/security/sandbox/linux/launch/SandboxLaunch.cpp 2021-07-05 18:20:36.000000000 +0200
+++ firefox-90.0/security/sandbox/linux/launch/SandboxLaunch.cpp 2021-07-20 08:39:17.272136982 +0200
@@ -501,8 +501,7 @@
MOZ_NEVER_INLINE MOZ_ASAN_BLACKLIST static pid_t DoClone(int aFlags,
jmp_buf* aCtx) {
static constexpr size_t kStackAlignment = 16;
- uint8_t miniStack[PTHREAD_STACK_MIN]
- __attribute__((aligned(kStackAlignment)));
+ uint8_t miniStack[4096] __attribute__((aligned(kStackAlignment)));
#ifdef __hppa__
void* stackPtr = miniStack;
#else
@@ -523,13 +522,19 @@
CLONE_CHILD_CLEARTID;
MOZ_RELEASE_ASSERT((aFlags & kBadFlags) == 0);
+ // Block signals due to small stack in DoClone.
+ sigset_t oldSigs;
+ BlockAllSignals(&oldSigs);
+
+ int ret = 0;
jmp_buf ctx;
if (setjmp(ctx) == 0) {
// In the parent and just called setjmp:
- return DoClone(aFlags | SIGCHLD, &ctx);
+ ret = DoClone(aFlags | SIGCHLD, &ctx);
}
+ RestoreSignals(&oldSigs);
// In the child and have longjmp'ed:
- return 0;
+ return ret;
}
static bool WriteStringToFile(const char* aPath, const char* aStr,
Only in firefox-90.0/security/sandbox/linux/launch: SandboxLaunch.cpp~

View File

@ -0,0 +1,48 @@
Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Date: 2021-08-14
Initial Package Version: unknown, sometimes needed for 91.0.
Upstream Status: Inapplicable
Origin: found at archlinux32.
Description: This is an old patch from Arch, they build with
clang and lto and have apparently needed this in the past.
On two of my systems (one from May 21 and one of my BLFS-10.0
systems) firefox-91.0esr FTBFS with a message that a python
check on libgkrust.a identified one networking function,
getsockname, in the rust static library. The reason why this
is now giving a problem, but only on some systems, is not
understood, but this seems to stop it.
Doug found this at
https://git.archlinux32.org/packages/tree/extra/firefox/rust-static-disable-network-test-on-static-libraries.patch
--- a/config/makefiles/rust.mk 2020-10-13 20:23:09.920635480 +0200
+++ b/config/makefiles/rust.mk 2020-10-13 20:24:02.273994137 +0200
@@ -324,17 +324,17 @@
# the chance of proxy bypasses originating from rust code.
# The check only works when rust code is built with -Clto but without MOZ_LTO_RUST_CROSS.
# Sanitizers and sancov also fail because compiler-rt hooks network functions.
-ifndef MOZ_PROFILE_GENERATE
-ifeq ($(OS_ARCH), Linux)
-ifeq (,$(rustflags_sancov)$(MOZ_ASAN)$(MOZ_TSAN)$(MOZ_UBSAN))
-ifndef MOZ_LTO_RUST_CROSS
-ifneq (,$(filter -Clto,$(cargo_rustc_flags)))
- $(call py_action,check_binary,--target --networking $@)
-endif
-endif
-endif
-endif
-endif
+#ifndef MOZ_PROFILE_GENERATE
+#ifeq ($(OS_ARCH), Linux)
+#ifeq (,$(rustflags_sancov)$(MOZ_ASAN)$(MOZ_TSAN)$(MOZ_UBSAN))
+#ifndef MOZ_LTO_RUST
+#ifneq (,$(filter -Clto,$(cargo_rustc_flags)))
+# $(call py_action,check_binary,--target --networking $@)
+#endif
+#endif
+#endif
+#endif
+#endif
force-cargo-library-check:
$(call CARGO_CHECK) --lib $(cargo_target_flag) $(rust_features_flag)

View File

@ -17,7 +17,7 @@
%define pkgver %(echo %version | tr . _)
Name: firefox
Version: 90.0.2
Version: 91.0
Release: 1mamba
Epoch: 1
Summary: The next generation browsing technology from mozilla.org
@ -55,6 +55,8 @@ Patch12: firefox-48.0.1-install_dir.patch
Patch13: firefox-85.0.2-Use-remoting-name-for-GDK-application-names.patch
Patch14: firefox-69.0.2-no-relinking.patch
Patch15: firefox-70.0-fix-__warn_memset_zero_len.patch
Patch16: firefox-91.0-glibc-2.34.patch
Patch17: firefox-91.0-rustc-1.54.patch
License: GPL, LGPL, MPL 1.1
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -125,7 +127,7 @@ BuildRequires: nasm
BuildRequires: ImageMagick
#BuildRequires: python-pygments252
BuildRequires: libcxx-devel
BuildRequires: breakpad
BuildRequires: dump_syms
Provides: xulrunner
Obsoletes: xulrunner < 1:86.0.1
@ -281,6 +283,9 @@ sed -e 's|__RPM_VERSION_INTERNAL__|%{firefox_internal_version}|' %{PATCH0} | pat
#%patch15 -p1
#%endif
%patch16 -p1
%patch17 -p1
echo -n "AIzaSyBT3wXwxmFuUQcyeMyp0MbHHhhFwNfWKTc" >google-api-key
#echo -n "$_mozilla_api_key" >mozilla-api-key
@ -345,6 +350,7 @@ END
mkdir -p mozbuild
%build
#:<< _EOF
#export MOZ_SOURCE_REPO=https://hg.mozilla.org/mozilla-unified
export MOZ_NOSPAM=1
export MOZBUILD_STATE_PATH="`pwd`/mozbuild"
@ -502,7 +508,7 @@ includedir=%{firefoxincludedir}
Name: Mozilla Plug-In API
Description: Mozilla Plug-In API
Version: 90.0.2
Version: 91.0
Cflags: -I\${includedir} -DXP_UNIX
_EOF
@ -623,6 +629,9 @@ fi
%{_libdir}/pkgconfig/mozilla-plugin.pc
%changelog
* Tue Aug 17 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 91.0-1mamba
- update to 91.0
* Thu Jul 22 2021 Automatic Build System <autodist@mambasoft.it> 90.0.2-1mamba
- automatic version update by autodist